A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
For a macro-enabled Excel file on a local LAN share, the most reliable fixes are based on whether the file has Mark of the Web or whether the network location is treated as untrusted.
- Check whether the file can be unblocked
- In File Explorer, right-click the Excel file > Properties.
- On the General tab, look for Unblock.
- If it is available, select Unblock > Apply > OK.
- Reopen the file.
- If Unblock is not available for the network file
This is common for files on network shares. In that case, trust the location instead of only the file.
- On each affected PC, open Excel.
- Go to File > Options > Trust Center > Trust Center Settings.
- Open Trusted Locations.
- If needed, make sure trusted locations are not disabled.
- Add the specific shared folder that contains the workbook.
- If the workbook is in subfolders, select Subfolders of this location are also trusted.
- Restart Excel and test again.
- Allow network documents to be trusted
On the affected PC in Excel:
- File > Options > Trust Center > Trust Center Settings > Trusted Documents
- Enable Allow documents on the network to be trusted
- Then test the workbook again.
- If the share is still treated as internet/untrusted
Add the file server or share to Windows security zones:
- Open Control Panel > Internet Options > Change security settings.
- Add the file server/share to Trusted sites or Local intranet.
- Trusted sites is generally recommended over adding new locations to Local intranet.
- If the share is accessed by IP address, macros can still be blocked unless that share is in Trusted sites or Local intranet.
- Adding a site/share as trusted reduces blocking for files from that location, so only use locations that are tightly controlled.
- If only one system has the problem
Compare that PC with a working PC:
- Whether the shared path is added under Trusted Locations
- Whether Allow documents on the network to be trusted is enabled
- Whether the server/share is in Trusted sites or Local intranet
- Practical workaround that has resolved this for network files
- Copy the workbook from the LAN share to a local folder.
- Open it locally.
- Save it back to the network location.
- About the yellow bar / Enable Content If Excel shows a normal Security Warning with Enable Content, the file can be made a trusted document. But for files blocked as untrusted source, the newer Security Risk behavior does not provide Enable Content. In that case, unblocking the file or trusting the location is required.
For this scenario, the best end-to-end path is:
- Add the shared folder as a Trusted Location on the affected PCs
- Enable Allow documents on the network to be trusted
- If the share is accessed by IP or still blocked, add the server/share to Trusted sites
- If needed, test by copying the file local, opening it, and saving it back
- Macros from the internet are blocked by default in Office
- Macros from the internet are blocked by default in Office
- Macros from the internet are blocked by default in Office
- Blocked Macros - Microsoft Q&A
- SOLVED - Excel 21 stating "Microsoft has blocked macros from running because the source of this file is untrusted." for a network file - Microsoft Q&A