Search code examples
vbaexcelexcel-2013

Excel stops opening XLSM file after running code


After running this code

Application.ScreenUpdating = False
Workbooks.Open Filename:=FilePath, UpdateLinks:=True, ReadOnly:=True
ActiveWindow.Visible = False
ThisWorkbook.Activate
Application.ScreenUpdating = True

Excel opening my file with blank page, all pages exist in VBA editor. All menu items is not accessible

enter image description here enter image description here

Whats hapens?

SOLVED:

enter image description here


Solution

  • Visible:=False
    

    You ordered it to be invisible. Try setting the property to True.