How to Unblock Excel Macros Blocked by Microsoft Office
Question details
Users need to unblock and run VBA macros in Excel workbooks that have been downloaded from the internet or received via email.

- Product
- Microsoft Excel
- Device & OS
- Windows
- Scenario
- Attempting to open and run VBA macros in an Excel file downloaded from an external source, such as the internet or an email attachment.
- Observed behavior
- Excel blocks the macros from running and displays a security warning, because Windows applies a 'Mark of the Web' (MotW) to flag the file as untrusted.
Before unblocking any macros, ensure you completely trust the sender and the source of the file, as malicious VBA code can compromise your computer's security.
Unblock the Macro File via Windows File Properties
The most direct way to bypass the 'Security Risk' macro block is to remove the Mark of the Web flag directly from the file's properties in Windows.
When Windows downloads a file from the internet, it tags it with a hidden security attribute. Microsoft Office checks for this attribute and automatically blocks active content like macros. You can manually remove this block.
Ensure that Microsoft Excel and the specific workbook you are trying to unblock are completely closed before modifying the file properties.
Locate the downloaded Excel file in Windows File Explorer. Right-click the file and select 'Properties' from the context menu.
Navigate to the bottom of the 'General' tab. Look for a Security section that says 'This file came from another computer and might be blocked to help protect this computer'. Check the 'Unblock' box.
Click 'Apply' and then 'OK'. Reopen the file in Excel; the macros should now be available to run without the security block.

Add the File Folder to Excel's Trusted Locations
If you frequently download macro-enabled files to a specific folder, you can designate that folder as a Trusted Location in Excel so that files inside it are never blocked.
Try WPS Office for Seamless Macro and Spreadsheet Management
If Microsoft Office's strict security policies continuously block your trusted macros, consider WPS Office. It provides an intuitive interface, excellent compatibility with Excel formats, and robust tools for spreadsheet data analysis.
- 1. Download WPS Office: Visit the official WPS Office website to download and install the free software on your PC.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheets and use the 'Open' menu to locate your macro-enabled (.xlsm) file.
- 3. Edit Seamlessly: Enable any required permissions when prompted, and enjoy seamless editing without overly aggressive file blocking.

Frequently Asked Questions
Why does Windows block my Excel macros with a Security Risk warning?
Windows adds a hidden 'Mark of the Web' tag to files downloaded from the internet or saved from email attachments. Microsoft Office reads this tag and automatically blocks macros to protect your system from potentially malicious code.
What is selfcert.exe and do I need it to unblock macros?
Selfcert.exe is a tool included with Microsoft Office used to create a personal digital certificate for signing your own macros. You typically do not need it just to unblock a downloaded file; using the 'Unblock' checkbox in file properties is usually sufficient for files you trust.
How do I globally allow all macros to run in Excel?
You can enable all macros by going to File > Options > Trust Center > Trust Center Settings > Macro Settings, and selecting 'Enable VBA macros'. However, this is highly discouraged as it bypasses all security checks and makes your computer vulnerable to malicious code.
Why is the Unblock checkbox missing in File Properties?
The Unblock option may be missing if the file is stored on a FAT32 formatted drive (which doesn't support the Mark of the Web feature), a network share, or if the file has already been unblocked previously.




