VBA & Macro Problems

How to Unblock Excel Macros Blocked by Microsoft Office

Aamir Naveed AkramAamir Naveed Akram Oct 23, 2026 870 views

Question details

Users need to unblock and run VBA macros in Excel workbooks that have been downloaded from the internet or received via email.

How to Unblock Excel Macros Blocked by Microsoft Office
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 you start

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.

Solution 1Recommended

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.

1
Close Microsoft Excel

Ensure that Microsoft Excel and the specific workbook you are trying to unblock are completely closed before modifying the file properties.

2
Open File Properties

Locate the downloaded Excel file in Windows File Explorer. Right-click the file and select 'Properties' from the context menu.

3
Check the Unblock box

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.

4
Apply and Reopen

Click 'Apply' and then 'OK'. Reopen the file in Excel; the macros should now be available to run without the security block.

Unblock the Macro File via Windows File Properties
Missing Unblock Option: If you do not see the Unblock checkbox, the file might be on a network drive, saved on a FAT32 drive, or the issue might be related to Excel's internal Trust Center settings rather than Windows file blocking.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS Office website to download and install the free software on your PC.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheets and use the 'Open' menu to locate your macro-enabled (.xlsm) file.
  3. 3. Edit Seamlessly: Enable any required permissions when prompted, and enjoy seamless editing without overly aggressive file blocking.
Fully compatible with Microsoft Excel formats, including .xlsx, .xlsm, and .csv.Built-in robust spreadsheet engine that handles advanced formulas seamlessly.Lightweight installation and incredibly fast application launch times.Free to download and use with a highly familiar user interface.
microsoft office alternative - wps office

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.