VBA Trust Center Settings After a Windows Upgrade

February 10, 2026 · 8 min read

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.

Why Windows 11 Handles Macros Differently

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.

Important distinction: Trust Center settings control whether macros are allowed to run. They don't fix macros that fail to compile due to 64-bit compatibility issues. If your macros run but produce errors, or fail with "Compile error: Can't find project or library", the problem is in the VBA code itself — not Trust Center settings.

The Four Trust Center Macro Settings Explained

Excel's Trust Center offers four macro security levels. Understanding what each does prevents misconfiguration.

SettingWhat It DoesUse When
Disable all macros without notificationSilently blocks all VBA. No prompt, no option to enable.High-security environments where no macros should run
Disable with notificationBlocks macros but shows the "Enable Macros" bar. User can choose to enable.Most business environments — recommended default
Disable except digitally signedRuns 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

How to Configure Trust Center Settings

  1. Open Excel and go to File → Options.
  2. Select Trust Center in the left panel, then click Trust Center Settings.
  3. Click Macro Settings. Select Disable VBA macros with notification for a balanced approach.
  4. Click Trusted Locations. Click Add new location.
  5. Browse to the folder containing your macro-enabled files. If it's a network share, check Subfolders of this location are also trusted.
  6. Click OK to save. Files in trusted locations will now open without macro prompts.
For IT teams pushing settings via Group Policy: The Trusted Locations and macro settings in Trust Center can be pushed via Group Policy under User Configuration → Administrative Templates → Microsoft Excel → Excel Options → Security → Trust Center. This avoids manual configuration on every machine.

Using Trusted Locations vs. Unblocking Files

There are two approaches to resolving MOTW blocking for existing files:

Option 1: Trusted Locations (Preferred)

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.

Option 2: Unblock 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.

Option 3: PowerShell for Bulk Unblocking

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.

When Trust Center Settings Still Aren't Enough

Some macro failures persist even after correctly configuring Trust Center. This happens when the macros themselves have compatibility issues, not security issues:

32-bit Declare Statements

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.

Missing Object Library References

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".

The Long-Term Solution: Migrate the Files

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.

Fix the underlying problem, not just the settings

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 Scanner

Get tips like this in your inbox

Practical fixes for legacy Excel and Access problems. No spam.

← Back to all posts