Forum Discussion
Matt Colosky
Aug 18, 2017Copper Contributor
Workbook with macro crasheds Excel 2016 if it is a Trusted Document
Hello all, I have run into a strange issue where we have a workbook with macros in it that has worked in Excel 2007 without issue. Upon moving to Excel 2016, the workook is fine if the user...
JKPieterse
Aug 24, 2017Silver Contributor
Enabling content manually allows Excel to do processing before your code is run.
The Workbook_Open event sometimes may get triggered before Excel is finished with its housekeeping work (especially if a file is double-clicked from Explorer and Excel hasn't loaded at that time). One way around this is to postpone any workbook_open handling by moving the code in there to a sub in a normal module and scheduling that macro in Workbook_Open using Application.OnTime. That allows for Excel to finish all its startup work before the scheduled code is called.