When you open the workbook assign it to a variable:
Then, to close the workbook you simply:![]()
Dim WorkbookToOpen as Workbook set WorkbooktoOpen = workbooks.open(Filetoopen)
![]()
Application.Displayalerts = false WorkbookToOpen.close Application.displayalerts = true
Bookmarks