Login or sign up Lost password?
Login or sign up
I want to search through existing Excel files with a macro, but I don't want to display those files when they're opened by the code. Visible = False 'Visible is False by default, so this isn't necessary Dim book As Excel. Borrowing the connection string from a project I've used it on, it will look kinda like this: Note that "Registration List" is the name of the tab in the workbook. If you don't the user might not be able to open excel files by double clicking or launching from other apps unless they logoff or know how to kill processes (because the files get opened in the invisible window). Screen Updating = True End Sub Private Sub Workbook_Before Close(Cancel As Boolean) w. Saved = True 'this will suppress the safe prompt for the data file only End Sub This is somewhat derivative of the answer posted by Ashok.