VBA & Macro Problems

Fix Excel Workbook_Open Not Running When XLAM Add-In Is Open

WPS Content ManagerWPS Content Manager Oct 10, 2026 873 views

Question details

The user needs to fix an issue where the Excel Workbook_Open VBA event fails to trigger if an XLAM add-in is already open in the background.

How to Fix Excel Workbook_Open Not Running When an XLAM Add-In Is Open
Product
Microsoft Excel
Device & OS
not provided
Scenario
Automating tasks upon opening a workbook using the Workbook_Open event while concurrently running XLAM add-ins.
Observed behavior
The Workbook_Open VBA procedure does not execute when the XLAM file is opened first, but it runs normally when the XLAM file is closed or unloaded.
Before you start

Ensure you have access to the Visual Basic for Applications (VBA) Editor by pressing ALT + F11, as you will need to check macro codes and system event settings.

Solution 1Recommended

Check and Re-enable Excel Application Events via VBA

Use the Immediate Window in the VBA Editor to verify if application events have been disabled by the XLAM add-in and manually turn them back on.

Often, an XLAM add-in might contain VBA code that sets 'Application.EnableEvents = False' to prevent recursive loops. If the add-in crashes or fails to set it back to 'True', all subsequent application triggers, including Workbook_Open, will stop functioning.

1
Open the VBA Editor

Press ALT + F11 on your keyboard to open the Visual Basic for Applications (VBA) Editor in Excel.

2
Open the Immediate Window

Press CTRL + G to display the Immediate Window, usually located at the bottom of the VBA Editor screen.

3
Check the EnableEvents Status

Type '?Application.EnableEvents' in the Immediate Window and press Enter. If the system returns 'False', events are currently disabled.

4
Re-enable Application Events

Type 'Application.EnableEvents = True' in the Immediate Window and press Enter to restore default event triggers.

5
Test the Workbook

Close the VBA editor and re-open your target workbook to confirm that the Workbook_Open event executes correctly.

Check and Re-enable Excel Application Events via VBA
Events Successfully Restored: Once EnableEvents is set back to True, all workbook-level macro triggers will immediately resume normal operation.
Free Microsoft Office alternative

Experience Seamless VBA & Macro Compatibility with WPS Office

If you frequently encounter complex Excel add-in conflicts or unresponsive Workbook_Open events, consider trying WPS Office. It provides a highly compatible spreadsheet environment that handles standard Office formats and advanced macro configurations reliably.

  1. 1. Download WPS Office: Visit the official WPS Office website and download the free installation package.
  2. 2. Install the Software: Run the installer and follow the on-screen instructions to set up WPS Office on your computer.
  3. 3. Open Your Macro-Enabled Files: Launch WPS Spreadsheets and open your .xlsm or .xlam files to experience seamless macro performance.
Fully compatible with Microsoft Excel formats, including .xlsx, .xlsm, and .xlam.Lightweight architecture for faster startup times and smoother multitasking.Familiar user interface requiring zero learning curve for existing Excel users.Comprehensive built-in tools for advanced data analysis and PDF editing.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Workbook_Open event not trigger in Excel?

The most common reasons are that macros are disabled in your Excel Trust Center settings, or 'Application.EnableEvents' has been set to False by another macro or an XLAM add-in running in the background.

What exactly is an XLAM file?

An XLAM file is an Excel Macro-Enabled Add-in. It is used to distribute custom VBA functions, macros, and tools to Excel. These files usually run invisibly in the background when Excel is opened.

How can I ensure events are always enabled when Excel starts?

You can create a personal macro workbook (PERSONAL.XLSB) that includes a Workbook_Open script to forcefully execute 'Application.EnableEvents = True' every time you launch the Excel application.

Does WPS Office support XLAM add-ins and VBA macros?

Yes, specific versions of WPS Office include comprehensive VBA support, allowing you to run and edit macros, open .xlsm workbooks, and utilize XLAM add-ins with high compatibility to Microsoft Excel scripts.