In that case, hold shift when you click the file inįig. Of course your file might be listed in the Most Recently Used files 1: Selecting the file from the File, Open dialog Have already set the document to trusted or the document is in a trustedįolder, click File, Open, select your file and hold down the shift keyįig. If you have set your macro security to "Enable All Macros" or you 'Do something Excel 2010, 2013, 2016 Macro security set to low or trusted document
#HOW TO STOP AUTO OPEN WINDOWS IN EXCEL FOR THE MAC CODE#
Key is held down, you can use code similar to this: If the workbook is yours and you just need a way to prevent the openĮvent (or any other event for that matter) to do anything when the shift Workaround 2: Detect the shift key is down Please note, that none of the application or workbookĮvents will now fire so you'll have to set that value back to True to With your cursor on that line, press the Enter key. You open an Excel file through the usual user interface methods as theyĪre shown below.
No longer possible to prevent the workbook Open events from firing when Recently, the behavior of Excel has changed in this area and it is The VBA code can containĮvents which will eventually run and possibly cause trouble. I do not recommend using this method to openįiles from sources you do not know or trust. Or a menu entry) or if a User Defined function in your code has been If the file you opened using the methods described belowĬontains other event handlers, note that these event handlers will remainĭisabled until you start a macro manually (by clicking a command button Want to happen when I start working with the file. Takes a while to run, or configures the project in a way which I don't
Why would you want to do this? Typically, I use this on my own files Workbook_Open event code or an Auto_Open macro from running. At the same time I sometimes want to prevent Preventing auto_open and Workbook_Open events from running ContentĪs a fulltime developer I oftentimes open files containing VBA and