Open Excel file for reading with VBA without display Open Excel file for reading with VBA without display vba vba

Open Excel file for reading with VBA without display


Not sure if you can open them invisibly in the current excel instance

You can open a new instance of excel though, hide it and then open the workbooks

Dim app as New Excel.Applicationapp.Visible = False 'Visible is False by default, so this isn't necessaryDim book As Excel.WorkbookSet book = app.Workbooks.Add(fileName)'' Do what you have to do'book.Close SaveChanges:=Falseapp.QuitSet app = Nothing

As others have posted, make sure you clean up after you are finished with any opened workbooks


If that suits your needs, I would simply use

Application.ScreenUpdating = False

with the added benefit of accelerating your code, instead of slowing it down by using a second instance of Excel.


To open a workbook as hidden in the existing instance of Excel, use following:

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