How to Stop Excel Workbook_Open VBA Macros from Running
Question details
The user wants to find an alternative method to prevent Workbook_Open VBA macros from executing automatically upon opening an XLSM file, as the standard Shift-key bypass method is failing in Microsoft 365.
- Product
- Microsoft 365 Excel
- Device & OS
- not provided
- Scenario
- Opening a macro-enabled workbook (XLSM) safely without triggering its startup code.
- Observed behavior
- Holding the Shift key no longer bypasses the Workbook_Open event in Microsoft 365 Excel, causing the macros to run unexpectedly.
Before proceeding, ensure you have saved and closed any other active Excel workbooks, as changing global macro security settings will apply to your entire Excel application.
Disable Macros via Excel Trust Center Settings
Change your global macro settings to prevent any macro from running automatically without notification before you open the problematic file.
This is the most reliable method for stopping startup macros when the Shift-key shortcut fails. It prevents all macros from executing until you manually allow them.
Launch Excel and open a new, blank workbook rather than the macro-enabled file.
Go to File > Options. In the Excel Options dialog box, select 'Trust Center' from the left sidebar, then click the 'Trust Center Settings' button.
Click on 'Macro Settings' in the left menu. Select the option 'Disable all macros without notification' and click OK to apply the changes.
You can now safely open your target XLSM file. The Workbook_Open macro will be blocked from running.
Temporarily Disable Application Events Using VBA
Use a separate, trusted helper workbook to temporarily turn off Excel's application events, which prevents the Workbook_Open event from triggering.
Report the Changed Shift-Key Behavior
Since the traditional Shift-key bypass is failing in Microsoft 365, reporting the issue helps Microsoft track and address the bug.
Try WPS Office for Reliable Macro Support
If changing behaviors in Microsoft 365 are interrupting your workflow, consider switching to WPS Office. It provides a stable, lightweight, and highly compatible alternative that processes VBA macros reliably while supporting all standard Excel formats.
- 1. Download and Install: Get WPS Office for free from the official website and install it on your device.
- 2. Open WPS Spreadsheet: Launch the Spreadsheet application and navigate to the security settings.
- 3. Configure Macro Security: Adjust your macro permissions safely before opening any complex VBA-enabled files.

Frequently Asked Questions
Why doesn't the Shift key stop macros from running in Microsoft 365?
Microsoft 365 undergoes continuous updates to its security and event-handling behaviors. Recent updates have inadvertently caused the traditional method of holding the Shift key to bypass the Workbook_Open event to become unreliable or stop working entirely.
Can I disable macros for just one specific workbook?
The Trust Center macro settings apply to the entire Excel application. However, using the helper workbook method with 'Application.EnableEvents = False' in the VBA Editor allows you to prevent macros from running in a specific workbook you are about to open, without changing global security settings.
Will disabling macros in the Trust Center affect my other Excel files?
Yes, setting the Trust Center to 'Disable all macros without notification' will block macros in all workbooks you open. Once you are finished troubleshooting your specific file, remember to change the setting back to 'Disable all macros with notification' if you need to run trusted macros in other files.




