logo
search
VBA & Macro Problems

How to Stop Excel Workbook_Open VBA Macros from Running

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

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 you start

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.

Solution 1Recommended

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.

1
Open a Blank Workbook

Launch Excel and open a new, blank workbook rather than the macro-enabled file.

2
Navigate to Trust Center

Go to File > Options. In the Excel Options dialog box, select 'Trust Center' from the left sidebar, then click the 'Trust Center Settings' button.

3
Adjust Macro Settings

Click on 'Macro Settings' in the left menu. Select the option 'Disable all macros without notification' and click OK to apply the changes.

4
Open the XLSM File

You can now safely open your target XLSM file. The Workbook_Open macro will be blocked from running.

Remember to Re-enable: If you need to use macros later, remember to return to the Trust Center and change the setting back to 'Disable all macros with notification'.
Free Microsoft Office alternative

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. 1. Download and Install: Get WPS Office for free from the official website and install it on your device.
  2. 2. Open WPS Spreadsheet: Launch the Spreadsheet application and navigate to the security settings.
  3. 3. Configure Macro Security: Adjust your macro permissions safely before opening any complex VBA-enabled files.
Seamless compatibility with Microsoft Excel formats (.xls, .xlsx, .xlsm)Reliable execution and traditional management of VBA macrosLightweight design that uses fewer system resourcesFamiliar, easy-to-navigate user interface
microsoft office alternative - wps office

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.