VBA & Macro Problems

How to Fix Excel Trusted Locations for OneDrive Folders

Huda QurayshiHuda Qurayshi Nov 3, 2026 868 views

Question details

Users are unable to run macro-enabled workbooks stored in OneDrive because Excel blocks them due to unrecognized trusted locations or Group Policy restrictions.

How to Fix Excel Trusted Locations for OneDrive Folders
Product
Microsoft Excel
Device & OS
not provided
Scenario
Attempting to open and run a macro-enabled Excel workbook synced via a OneDrive folder after a recent Office update.
Observed behavior
Excel blocks the macros from running, failing to recognize the OneDrive folder as a trusted location.
Before you start

Ensure you know the exact local file path of your OneDrive folder and verify whether the issue affects a single workbook or all macro-enabled files.

Solution 1Recommended

Remove and Re-add the OneDrive Folder to Trusted Locations

Resetting the trusted location path forces Excel to re-recognize the OneDrive folder and its macro permissions.

1
Open Trust Center

Launch Excel and navigate to File > Options > Trust Center. Click on the 'Trust Center Settings' button.

2
Remove Existing Location

Select 'Trusted Locations' from the left menu. Find your current OneDrive folder path in the list, click on it, and select 'Remove'.

3
Add Location Again

Click 'Add new location', browse to select your local OneDrive folder, and check the box that says 'Subfolders of this location are also trusted'.

4
Apply and Restart

Click 'OK' to save your changes, then completely close and reopen Excel before opening your macro-enabled workbook to test.

Remove and Re-add the OneDrive Folder to Trusted Locations
Correct Path Verification: Make sure you select the local synced OneDrive path (e.g., C:\Users\YourName\OneDrive) rather than a web URL.
Free Microsoft Office alternative

Seamlessly Manage Spreadsheets with WPS Office

Tired of complicated Trust Center settings and blocked files in Microsoft Excel? WPS Office provides a free, lightweight, and highly compatible alternative that effortlessly handles standard spreadsheet formats, letting you focus on your actual work rather than troubleshooting configuration issues.

  1. 1. Download and Install: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheets and click 'Open' to locate your existing workbook from your local drive or cloud storage.
  3. 3. Work Seamlessly: Continue editing, analyzing data, and saving your work with complete peace of mind and excellent format retention.
Highly compatible with Microsoft Office formats, including .xlsx, .xls, and .csv files.Lightweight design ensures fast loading and smooth performance even on older devices.Familiar user interface allows for a seamless transition with zero learning curve.Free to download and use for essential daily office tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why did Excel suddenly block macros in my OneDrive folder?

This often happens after a Microsoft Office update or when network administrators deploy new Group Policy settings that reset or restrict existing Trusted Locations for security reasons.

Does the 'Subfolders of this location are also trusted' option matter?

Yes. If your macro-enabled workbooks are saved in nested folders inside the main OneDrive directory, you must check this option so Excel extends trust to those subfolders.

What if only one specific file is affected?

If only one file is blocked while others work fine, check the file format to ensure it is saved as a Macro-Enabled Workbook (.xlsm) and verify that the file itself hasn't been corrupted or blocked by Windows security properties (right-click the file, select Properties, and check 'Unblock' if available).