Stop an Excel 2019 Auto_Open Macro When Shift Does Not Work
Question details
Prevent an Auto_Open macro from running when opening a trusted XLSM workbook in Excel 2019.

- Product
- Microsoft Excel 2019
- Device & OS
- not provided
- Scenario
- The user holds Shift while opening an XLSM file from Excel and expects its startup macro to be suppressed.
- Observed behavior
- The Auto_Open macro runs despite the user holding Shift, although the same procedure previously stopped it.
Close the affected workbook and identify its folder before changing Excel's security settings. The menu names below are for Excel 2019 on Windows and may differ on other platforms.
Disable macros and remove the workbook's trusted location
Use this approach to open the workbook for inspection without relying on the Shift shortcut.
Files in a Trusted Location can bypass normal macro security checks, so disabling macros alone may not stop startup code in those files.
With the workbook closed, open Excel and select File > Options > Trust Center > Trust Center Settings.
Select Macro Settings, choose Disable all macros without notification, and click OK. This setting affects other workbooks too.
Return to Trust Center Settings > Trusted Locations. If the workbook's folder is listed, select it and click Remove, or open a copy from a folder that is not trusted.
In Trust Center Settings > Trusted Documents, select Disable Trusted Documents if available. This helps prevent a previously trusted workbook from retaining its trusted status.
Open the workbook from its non-trusted folder without enabling content. Press Alt+F11 to inspect its VBA code, and do not run any procedures.

Retry the Shift bypass when opening the workbook
Use this as a quick check, but do not depend on it when startup code must not run.
Open Excel Workbooks with WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing spreadsheets. Its Microsoft Office format support helps you move existing files, though it does not fix Excel's macro settings and VBA compatibility can vary.

Frequently Asked Questions
Why does Auto_Open run even when I hold Shift?
The Shift bypass may not work reliably in every opening scenario. Check the workbook's trust status under File > Options > Trust Center, and disable macros before reopening it if the code must not run.
Will disabling macros stop code in a Trusted Location?
Not necessarily. Files in Trusted Locations can bypass macro security checks. Remove the folder under Trust Center Settings > Trusted Locations or open a copy from a non-trusted folder.
How can I inspect the VBA without running it?
Disable macros, check that the file is not in a Trusted Location, and open it without enabling content. Press Alt+F11 to inspect the code without running its procedures.
Does holding Ctrl stop Auto_Open?
On Windows, holding Ctrl while starting Excel opens Excel in Safe Mode. That is different from preventing a specific workbook's Auto_Open procedure; use Trust Center settings to control macros.




