logo
search
VBA & Macro Problems

Fix Excel Macros Not Working After Windows 11 Upgrade

Elise WilliamsElise Williams Sep 28, 2026 869 views

Question details

The user is experiencing issues where Excel macros and add-ins that respond to tab changes fail to execute after upgrading the operating system from Windows 10 to Windows 11, despite correct Trust Center settings.

How to Fix Excel Macros Not Working After Windows 11 Upgrade
Product
Microsoft Excel
Device & OS
Windows 11
Scenario
Running specialized Excel macros and add-ins after a system upgrade to Windows 11.
Observed behavior
Macros and add-ins stop working or fail to trigger properly in Windows 11, even when macro security and blocking settings are correctly configured.
Before you start

Ensure you have administrative privileges on your Windows 11 PC and create a backup copy of your Excel workbook with dummy data to safely test VBA code modifications.

Solution 1Recommended

Isolate and Debug the VBA Code

Create a safe copy of the workbook to isolate the problematic code causing compatibility issues in Windows 11.

Often, an OS upgrade can cause specific lines of VBA code (such as API calls or file path references) to fail. By running the code step-by-step in a safe environment, you can pinpoint the exact function causing the crash.

1
Create a test workbook

Make a copy of the original Excel workbook and replace any sensitive or confidential data with dummy data.

2
Open the VBA Editor

Press Alt + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor.

3
Step through the macro

Locate the macro that handles tab changes, place your cursor inside the code, and press F8 repeatedly to execute the code line by line. Note exactly which line produces an error.

Isolate and Debug the VBA Code
Provide Error Details: If you cannot fix the highlighted line yourself, copy the specific code snippet and the exact error message to share with a developer or IT support.
Free Microsoft Office alternative

Try WPS Office for a Seamless Spreadsheet Experience

If Windows 11 updates and Microsoft Excel compatibility issues continue to interrupt your workflow, consider switching to WPS Office. It provides a lightweight, highly compatible alternative for handling complex spreadsheets and everyday data analysis without the steep costs.

Fully compatible with Microsoft Excel formats (.xlsx, .xls, .csv, .xlsm)Advanced spreadsheet tools for data analysis and visualizationFamiliar user interface for a zero learning curve and seamless migrationLightweight architecture that performs excellently on Windows 11
microsoft office alternative - wps office

Frequently Asked Questions

Why do macros sometimes break after upgrading to Windows 11?

Operating system upgrades can alter default system paths, update security protocols, or change registry keys. This can cause specific VBA references, API calls, and specialized add-ins to lose connection or fail execution.

How do I know if my Trust Center settings are correct in Excel?

Navigate to File > Options > Trust Center > Trust Center Settings > Macro Settings. Ensure that 'Enable VBA macros' is temporarily selected for troubleshooting purposes and that 'Trust access to the VBA project object model' is checked.

Does WPS Office support VBA macros?

Yes, WPS Office offers robust VBA macro support in its Pro version. It allows users to run, edit, and create macros with high compatibility for standard Excel VBA scripts.

What should I do if my VBA code contains 32-bit API calls on a 64-bit Windows 11 system?

You need to update your API declarations in the VBA code. Add the 'PtrSafe' keyword to your Declare statements and change variables that store pointers or handles from 'Long' to 'LongPtr'.