I have a simple statement in my Workbook_Open macro "Sheets("GIS Labor Supplier Spending").Select" which works fine if I open a single work book or if I open a number of files with this macro from Windows Explorer.
However, if I open a number of files at the same time from the Excel Open Files dialog box, I get the following error message on some variable number of the files being opened:
- Run-time error '1004'
Select method of Worksheet class failed.
If I follow the debug statement, it goes directly to the select statement. Checking the immediate window for the active sheeet, active workbook, comparing the worksheet name in the select statement to the name Excel returns, all produce no errors. The same worksheet will open fine by itself or when opened from Windows Explorer.
Anyone with any idea as to why this might be happening?
However, if I open a number of files at the same time from the Excel Open Files dialog box, I get the following error message on some variable number of the files being opened:
- Run-time error '1004'
Select method of Worksheet class failed.
If I follow the debug statement, it goes directly to the select statement. Checking the immediate window for the active sheeet, active workbook, comparing the worksheet name in the select statement to the name Excel returns, all produce no errors. The same worksheet will open fine by itself or when opened from Windows Explorer.
Anyone with any idea as to why this might be happening?