Fix Excel Macro Files Blocked on Shared Drives
Question details
Users are unable to edit or execute macro-enabled Excel files stored on a network shared drive due to Microsoft security blocks.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Attempting to open and use a macro-enabled workbook from a company network share, file server, or UNC path after a recent Office update.
- Observed behavior
- Excel blocks the macros, displaying a security warning that the file source is untrusted, preventing VBA execution even though local copies function correctly.
Ensure you have the exact UNC path of your network shared drive (e.g., \\server\share) and confirm with your IT administrator that adding this path to your Trusted Locations complies with your organization's security policies.
Add the Network Path to Excel Trusted Locations
This method configures Excel to recognize files from your specific shared drive as safe, effectively bypassing the security block for that directory.
Adding a network location to the Trust Center tells Excel to ignore the Mark of the Web (MOTW) for files in that specific folder, allowing macros to run normally.
Launch Microsoft Excel, navigate to File > Options. Select Trust Center from the left-hand menu, and click the Trust Center Settings button.
Click on Trusted Locations in the left pane. Check the box at the bottom labeled 'Allow Trusted Locations on my network (not recommended)'.
Click 'Add new location...', enter the UNC path (e.g., \\server\share) of your network drive, and check 'Subfolders of this location are also trusted' if needed. Click OK to save.

Map the File Server as a Trusted Site in Windows
Adding the file server's IP or domain to your Windows Trusted Sites prevents the operating system from flagging network files as internet-sourced.
Digitally Sign Your Macro Code
Using a trusted digital signature allows your macros to run securely regardless of where the file is stored, including network drives.
Try WPS Office for a Hassle-Free Spreadsheet Experience
If Microsoft Office security updates continuously disrupt your workflow by blocking essential network files, consider switching to WPS Office. It provides a highly compatible, fast, and familiar environment for your macro-enabled spreadsheets without the restrictive update-induced roadblocks.
- 1. Download and Install: Visit the official WPS website and download the free WPS Office suite for your device.
- 2. Open Your Macro File: Launch WPS Spreadsheets and open your .xlsm file directly from your shared network drive.
- 3. Enable Macros: Click the prompt to safely enable macros and instantly resume your spreadsheet tasks.

Frequently Asked Questions
Why did my macros suddenly stop working on the shared drive?
Microsoft recently updated its default security policies for Office applications to automatically block macros in files originating from the internet or untrusted network locations. This change, utilizing the Mark of the Web (MOTW), is designed to prevent malware and ransomware infections.
What is a UNC path?
A UNC (Universal Naming Convention) path is the direct network address of a shared file or folder, formatted like \\server_name\folder_name. It is used instead of a mapped drive letter (like Z:\) to point directly to the server resource.
Does mapping a network drive bypass the macro security block?
No. Simply mapping a network drive to a letter (such as Z:) does not trick Excel into thinking it is a local drive. The underlying location is still a network path, so you must add the corresponding UNC path to your Trusted Locations.
How do I unblock just a single macro file instead of trusting the whole drive?
If you only need to use one file occasionally, you can copy it to your local computer's desktop, right-click the file, select Properties, and check the 'Unblock' box at the bottom of the General tab. You can then run the macros locally.




