logo
search
VBA & Macro Problems

How to Fix Microsoft 365 Macros Blocked from Running in Windows 11

Chanuka GeekiyanageChanuka Geekiyanage Sep 28, 2026 869 views

Question details

The user is unable to run macros in Microsoft 365 on a Windows 11 computer due to a persistent security block message, even after following standard troubleshooting instructions.

How to Fix Microsoft 365 Macros Blocked from Running
Product
Microsoft 365
Device & OS
Windows 11
Scenario
Attempting to run VBA macros in a downloaded or shared spreadsheet.
Observed behavior
The application displays a 'Microsoft has blocked macros from running' error message and prevents the macro from executing.
Before you start

Ensure the file containing the macro comes from a completely trusted source, as enabling macros from unknown internet locations poses a significant security risk to your system.

Solution 1Recommended

Remove the Mark of the Web (MOTW) Block via File Properties

The most common reason for blocked macros in Windows 11 is a security feature applied to downloaded files. You can remove this block in the file's properties.

Microsoft applies a 'Mark of the Web' tag to files originating from the internet or email attachments. Removing this tag tells Windows the file is safe.

1
Close the application

Fully close Microsoft Excel or the specific Microsoft 365 application where the file is currently open.

2
Locate the file

Open Windows File Explorer and navigate to the folder containing the blocked macro-enabled file.

3
Open file properties

Right-click the file and select 'Properties' from the context menu.

4
Unblock the file

At the bottom of the General tab, look for a Security section and check the box that says 'Unblock'. Click 'Apply' and then 'OK'.

5
Test the macro

Reopen the file in Microsoft 365 and attempt to run the macro again.

Remove the Mark of the Web (MOTW) Block via File Properties
File Unblocked: Once unblocked, the file will no longer trigger the internet origin macro block on your local machine.
Free Microsoft Office alternative

Try WPS Office for a Seamless Spreadsheet Experience

Tired of wrestling with complicated security blocks and strict macro settings in Microsoft 365? WPS Office offers a free, lightweight, and highly compatible alternative that makes managing your spreadsheets straightforward and hassle-free.

  1. 1. Download the software: Visit the official WPS website to download the free WPS Office installer.
  2. 2. Install quickly: Run the lightweight installer on your Windows 11 computer for a rapid setup.
  3. 3. Open your files: Open your existing spreadsheet files directly in WPS Spreadsheet and enjoy seamless editing.
Completely free to download and use with a highly intuitive, familiar user interface.Fully compatible with Microsoft Office formats, including .xlsx, .xls, and .csv files.Lightweight installation that runs smoothly on both older and modern Windows 11 devices.Powerful data analysis and spreadsheet features without the heavy subscription fees.
QA img-9

Frequently Asked Questions

Why does Microsoft 365 suddenly block my macros by default?

Microsoft recently updated its default security policies for Office applications to automatically block VBA macros in files originating from the internet (identified by the Mark of the Web). This change was implemented to protect users from malicious actors who use macros to distribute malware and ransomware.

What is Protected View and how does it affect macros?

Protected View is a secure, read-only mode for opening files from potentially unsafe locations. While a document is in Protected View, all macros are completely disabled. You must click 'Enable Editing' in the top yellow warning bar before you can interact with any macro content.

Can I create a trusted location to bypass macro blocks permanently?

Yes, you can bypass internet blocks by saving your files in a designated Trusted Location. Go to File > Options > Trust Center > Trust Center Settings > Trusted Locations, and add the specific Windows folder where you securely store your macro-enabled files. Files opened from this folder will automatically run macros.