How to Fix Shared Excel Macros Not Running from OneDrive
Question details
Users are unable to run macros in a shared Excel workbook stored on OneDrive, even though the macros execute successfully for the original file creator.

- Product
- Microsoft Excel, OneDrive
- Device & OS
- Windows
- Scenario
- Attempting to open and execute VBA macros in a shared macro-enabled workbook (.xlsm) synced or downloaded via OneDrive.
- Observed behavior
- The macro is blocked from running by the recipient's system security settings, often without a clear error message, despite working perfectly for the workbook's author.
Verify that the shared workbook is saved in the Macro-Enabled Workbook format (.xlsm) and ensure your local OneDrive client is fully synced with the cloud.
Add OneDrive to Windows Trusted Sites
Adding the OneDrive network path to your Trusted Sites prevents Windows from automatically blocking macros in files hosted on Microsoft's cloud servers.
When you open a file from a network location, Windows relies on Internet Options to determine if the source is secure. Adding the specific live.net URL ensures OneDrive files bypass strict network macro blocks.
Press the Windows key, type 'Internet Options' into the search bar, and press Enter to open the Internet Properties dialog box.
Click on the 'Security' tab at the top of the window, then click on the green checkmark icon labeled 'Trusted sites'.
Click the 'Sites' button. In the 'Add this website to the zone' field, type 'https://d.docs.live.net' and click 'Add'.
Click 'Close', then click 'OK' to apply the settings. Restart Microsoft Excel and attempt to run the macro again.

Configure Excel Trust Center Settings
Adjusting Excel's internal Trust Center settings ensures that macros from shared network locations are allowed to execute.
Unblock the File in Windows Properties
Windows automatically restricts macros in files downloaded from the internet using the Mark of the Web (MotW). Unblocking the file removes this restriction.
Try WPS Office for Seamless Macro Compatibility
If you are tired of troubleshooting complex Microsoft Excel security settings and network restrictions, WPS Office offers a powerful, lightweight alternative. It fully supports VBA macros, guarantees high compatibility with Excel (.xlsm) formats, and delivers a familiar interface with fewer syncing hurdles.
- 1. Download the software: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the installer and follow the simple on-screen instructions to set up WPS Office on your computer.
- 3. Open and run your macros: Open your macro-enabled workbook (.xlsm) directly in WPS Spreadsheet to securely and easily run your VBA scripts.

Frequently Asked Questions
Why do Excel macros run for the creator but not for me on OneDrive?
The file creator's computer automatically trusts the workbook they authored. When you access it via OneDrive, your system's security settings treat it as a file originating from the internet. Consequently, Windows applies a safety measure known as the 'Mark of the Web' and blocks the macros to protect your computer.
What is the https://d.docs.live.net URL used for in Trusted Sites?
This specific URL is the network path Microsoft uses to map personal OneDrive accounts. By adding it to your Windows Trusted Sites, you inform the operating system that files hosted on this server are safe, preventing Excel from automatically disabling embedded macros.
Is it safe to enable macros in a shared workbook?
You should only enable macros if you completely trust the person who created the file and understand the macro's function. Malicious macros can execute harmful code on your computer, which is why Excel disables them by default for shared or internet-downloaded files.
Why can't I find the 'Unblock' option in my file properties?
The 'Unblock' checkbox only appears if Windows has actively flagged the file as coming from another computer or the internet. If the option is missing, the file is already unblocked on your local drive, meaning the macro issue is likely caused by Excel's Trust Center settings instead.




