VBA & Macro Problems

Fix Excel Macro Files Blocked on Shared Drives

Chanuka GeekiyanageChanuka Geekiyanage Oct 15, 2026 869 views

Question details

Users are unable to edit or execute macro-enabled Excel files stored on a network shared drive due to Microsoft security blocks.

How to Fix Excel Macro Files Blocked on Shared Drives
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.
Before you start

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.

Solution 1Recommended

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.

1
Open Trust Center Settings

Launch Microsoft Excel, navigate to File > Options. Select Trust Center from the left-hand menu, and click the Trust Center Settings button.

2
Enable Network Trusted Locations

Click on Trusted Locations in the left pane. Check the box at the bottom labeled 'Allow Trusted Locations on my network (not recommended)'.

3
Add the UNC Path

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.

Add the Network Path to Excel Trusted Locations
Security Warning: Enabling network trusted locations reduces macro protection. Only add verified and highly secure network paths approved by your IT department.
Free Microsoft Office alternative

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. 1. Download and Install: Visit the official WPS website and download the free WPS Office suite for your device.
  2. 2. Open Your Macro File: Launch WPS Spreadsheets and open your .xlsm file directly from your shared network drive.
  3. 3. Enable Macros: Click the prompt to safely enable macros and instantly resume your spreadsheet tasks.
Highly compatible with Microsoft Excel formats (.xls, .xlsx, .xlsm)Free, lightweight, and fast installationFamiliar user interface for a seamless migrationRobust built-in support for VBA and macros
microsoft office alternative - wps office

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.