After upgrading to Windows 11 — or after a major feature update like 24H2 — many users find their macro-enabled Excel files suddenly prompt them to enable macros on every open, or refuse to run macros at all. This isn't Excel malfunctioning. It's Windows 11's improved security model treating your files as untrusted. Here's what's happening and how to fix it correctly.
Windows 11 strengthened the Mark of the Web (MOTW) system — a mechanism where files downloaded from the internet, received via email, or opened from network shares are tagged with a security zone identifier. Excel reads this tag and applies stricter macro security to any file marked as coming from an untrusted zone.
Windows 10 was less aggressive about applying MOTW to files on network shares and local paths. Windows 11 is more thorough, which means files that used to open without prompts on Windows 10 now prompt for macro approval on Windows 11 — even if they're the same files on the same network share you've used for years.
Excel's Trust Center offers four macro security levels. Understanding what each does prevents misconfiguration.
| Setting | What It Does | Use When |
|---|---|---|
| Disable all macros without notification | Silently blocks all VBA. No prompt, no option to enable. | High-security environments where no macros should run |
| Disable with notification | Blocks macros but shows the "Enable Macros" bar. User can choose to enable. | Most business environments — recommended default |
| Disable except digitally signed | Runs macros only if the VBA project is signed with a trusted certificate. Prompts otherwise. | Enterprises with macro signing infrastructure |
| Enable all macros (not recommended) | Runs all macros without any prompts or restrictions. | Developer machines only — never production |
There are two approaches to resolving MOTW blocking for existing files:
Add the containing folder as a trusted location. All files in that folder are treated as trusted going forward. This is the right approach for a shared network location that your team uses regularly. The folder is trusted — not individual files.
Right-click any individual file in Windows Explorer, select Properties, and check the "Unblock" checkbox at the bottom of the General tab. This removes the MOTW zone identifier from that specific file. Useful for one-off files; impractical for large libraries.
Get-ChildItem -Path "C:\YourFolder" -Recurse -Include "*.xls","*.xlsm" |
Unblock-File
This unblocks all .xls and .xlsm files in the target directory recursively. Use with caution — verify you trust all files in the target path before running.
Some macro failures persist even after correctly configuring Trust Center. This happens when the macros themselves have compatibility issues, not security issues:
VBA code that calls Windows APIs using the old-style Declare syntax (without PtrSafe) will fail in 64-bit Office regardless of Trust Center settings. The fix is to update the Declare statements:
' Old (fails in 64-bit Office):
Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" _
(ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
' Updated (works in 64-bit Office):
Declare PtrSafe Function GetTempPath Lib "kernel32" Alias "GetTempPathA" _
(ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
LegacyLeaps handles this automatically during migration — it scans all Declare statements in the VBA project and adds the PtrSafe attribute and updates LongPtr types where needed.
VBA projects that reference external object libraries (DAO, ADO, specific ActiveX controls) may show "Compile error: Can't find project or library" if those libraries aren't registered on the new machine. Check Tools → References in the VBA editor and look for any items marked as "MISSING".
Configuring Trust Center is a maintenance task. You'll need to set it on every new machine, update it for every new team member, and revisit it after every major Windows update. The permanent solution is to migrate .xls files to .xlsx/.xlsm format and update the VBA for modern Office.
Modern .xlsm files in trusted locations with properly-written VBA (64-bit compatible, no deprecated API calls) require no ongoing Trust Center maintenance. They just work.
For a complete guide to the VBA migration process, see Excel VBA Audit Before Migration and VBA Macros Stopped Working: Complete Troubleshooting Guide.
LegacyLeaps migrates your .xls files to modern format and updates VBA for 64-bit compatibility — so you stop fighting Trust Center settings every time something changes.
Download Free ScannerPractical fixes for legacy Excel and Access problems. No spam.