I have some code I placed in the Sub Workbook_Open in an xlsm file which is placed in XLSTART folder.
The code executes properly when Excel is opened.
Problem. If any code is in the Sub Workbook_Open, and the user double clicks an Excel Workbook and Excel is CLOSED, the workbook will open, the VBA Code will Execute, but the Doubleclicked Excel File WILL NOT OPEN in Excel when it starts. Remove code in Sub Workbook_Open and double clicked files will open normally. If Excel is already OPEN, the code in Sub Workbook_Open has no effect, double clicked files will open right up in Excel.
Has anyone else noticed this behavior?
I have tried Sleep and DoEvents in the Sub Workbook_Open to try and allow the doubleclicked file time to open at startup before the VBA Code begins to Execute but this did not work.
Any ideas?
Thanks.
The code executes properly when Excel is opened.
Problem. If any code is in the Sub Workbook_Open, and the user double clicks an Excel Workbook and Excel is CLOSED, the workbook will open, the VBA Code will Execute, but the Doubleclicked Excel File WILL NOT OPEN in Excel when it starts. Remove code in Sub Workbook_Open and double clicked files will open normally. If Excel is already OPEN, the code in Sub Workbook_Open has no effect, double clicked files will open right up in Excel.
Has anyone else noticed this behavior?

Any ideas?
Thanks.