logo
search
VBA & Macro Problems

How to Fix Blocked Macros in OneDrive Shared Excel Workbooks

Maira MehtabMaira Mehtab Sep 21, 2026 869 views

Question details

Users experience a macros-blocked warning when opening macro-enabled Excel workbooks shared through OneDrive.

Product
Excel
Device & OS
not provided
Scenario
Opening a macro-enabled workbook (.xlsm) that has been shared or synced via OneDrive.
Observed behavior
The file opens in Protected View and displays a warning that macros have been blocked, even when standard Trust Center settings have been configured.
Before you start

Verify that the shared workbook is from a trusted source, as enabling macros from the internet or unauthorized shared folders can expose your computer to malicious code.

Solution 1Recommended

Download the File to a Local Trusted Location

Save the file locally in a designated Trusted Location to bypass internet security restrictions and test if macros run successfully.

Downloading the file allows you to bypass the 'Mark of the Web' security feature that blocks macros on internet-sourced files. Keep in mind that working from a local directory will prevent real-time OneDrive collaboration.

1
Download the Workbook

Access your OneDrive account and download the macro-enabled Excel workbook to your local computer.

2
Configure Trusted Locations

Open Excel, navigate to 'File' > 'Options' > 'Trust Center', and click the 'Trust Center Settings' button.

3
Add a New Folder

Select 'Trusted Locations' from the left pane, click 'Add new location', and browse to the folder where you saved the downloaded file.

4
Test the Macros

Open the workbook from this newly trusted folder to verify that the macros run without triggering the blocked warning.

Real-time Collaboration: Using a local Trusted Location means the file is no longer shared through OneDrive, which stops real-time collaboration features.
Free Microsoft Office alternative

Try WPS Office for Seamless Spreadsheet Management

If you frequently encounter complex macro security blocks and OneDrive integration issues, consider switching to WPS Office. It is a free, lightweight, and highly compatible alternative that offers a familiar interface and excellent macro support.

  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 complete the setup.
  3. 3. Open Your Workbooks: Launch WPS Spreadsheets and open your macro-enabled files to experience seamless performance.
Fully compatible with Microsoft Excel formats, including .xlsx, .xlsm, and .xls.Supports VBA macros with an intuitive editing environment.Free and lightweight, ensuring fast installation and smooth operation.Familiar user interface enables seamless migration without a steep learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why are my macros blocked even after enabling them in the Trust Center?

Office applications block macros by default for files originating from the internet or OneDrive. Standard Trust Center settings do not override this 'Mark of the Web' security measure unless the file is placed in a designated Trusted Location or digitally signed.

Can I use OneDrive real-time collaboration with a file in a Trusted Location?

Typically, no. Downloading a file to a local Trusted Location disconnects it from OneDrive's live sharing. To keep collaboration active, the macro project needs to be trusted via a digital signature instead.

How do I manually unblock a single macro-enabled file downloaded from OneDrive?

Right-click the downloaded Excel file, select 'Properties', and look for the 'Security' section at the bottom of the 'General' tab. Check the 'Unblock' box and click 'Apply'.

Does allowing documents on a network to be trusted solve the OneDrive macro issue?

Not usually. Allowing trusted network documents typically applies to local Intranet shares, not internet-based cloud services like OneDrive. Modifying internet zone security policies or using digital signatures is required for cloud files.