Windows

How to Fix the “Microsoft Has Blocked Macros” Error in Excel for Windows

Learn five practical ways to fix the “Microsoft has blocked macros” error in Excel for Windows, including file trust settings, unblock options, trusted locations, and policy-related checks.

Andrew Miller
Andrew Miller
Technology Writer  •  Nov 22, 2026  •  5 min read

If Excel for Windows is showing a “Microsoft has blocked macros” message, the workbook is usually being protected because it came from an untrusted source or because your security settings are preventing macros from running. In many cases, you can fix it without changing anything risky.

The right fix depends on why the file is blocked. Sometimes the workbook needs to be unblocked in Windows, sometimes it must be opened from a trusted location, and sometimes Excel is following a policy setting that only your IT admin can change.

How to Fix the “Microsoft Has Blocked Macros” Error in Excel for Windows

1. Unblock the File in Windows

If you downloaded the workbook from email, a website, cloud storage, or a chat app, Windows may mark it as coming from another computer. That mark can cause Excel to block macros even if the file itself is legitimate.

Advertisement
  1. Close the workbook if it is open in Excel.
  2. In File Explorer, find the Excel file on your PC.
  3. Right-click the file and select Properties.
  4. On the General tab, look for an Unblock option near the bottom.
  5. If you see it, check Unblock, then click Apply and OK.
  6. Reopen the workbook in Excel and test the macro again.
Why It Matters This is one of the most common causes of the error because Windows attaches a security flag to files that come from outside your computer. Removing that flag often restores macro access immediately.
Note If you do not see an Unblock checkbox, the file may already be trusted by Windows or the block may be coming from Excel settings instead.

2. Move the Workbook to a Trusted Location

Excel can allow macros to run from folders that you mark as trusted. This is a good option when you regularly use macro-enabled workbooks from the same folder.

  1. Open Excel and go to File.
  2. Select Options, then Trust Center.
  3. Click Trust Center Settings.
  4. Open Trusted Locations.
  5. Click Add new location.
  6. Choose a folder where you want to keep trusted macro workbooks, then confirm the selection.
  7. Move the workbook into that folder and open it again from there.
Quick Tip Use a dedicated folder for trusted workbooks instead of your Downloads folder. Downloads is a common place for files to remain blocked or to be treated as unsafe.
Warning Only add folders you fully trust. Files in a trusted location may be allowed to run macros with less protection.

3. Check Excel Macro Security Settings

Excel has macro security settings that can stop macros from running entirely or can restrict them until you make an explicit choice. If the file is not blocked by Windows, these settings may be the reason macros still will not run.

  1. Open Excel.
  2. Go to File, then Options.
  3. Select Trust Center, then Trust Center Settings.
  4. Open Macro Settings.
  5. Review the available options.
  6. Choose the least permissive setting that still allows the workbook you need to use, then click OK.
Key Fact If your organization manages Excel through policy, some macro settings may be locked and unavailable to change manually.

If you are not sure which setting is right, avoid using a permissive option unless you understand the source of the file. A macro-enabled workbook can do useful automation, but it can also carry harmful code.

4. Make Sure the Workbook Is in a Macro-Enabled Format

Excel macros require a workbook format that supports them. If the file was saved or converted to a non-macro format, Excel may refuse to run the code even if the workbook opens normally.

If the workbook was renamed, exported, or saved as .xlsx, the macros may no longer be included. In that case, opening the file will not restore the missing macro code.

Best For This check is most useful when the workbook opens but the macros are missing, disabled, or no longer available after a file conversion or save-as step.

5. Check Whether Group Policy or IT Security Is Blocking Macros

On work computers, the block may be enforced by your organization rather than by Excel itself. In that case, changing settings locally may not solve the problem.

If these signs match your situation, contact your IT administrator. They may need to allow the file location, adjust a policy, or confirm that the workbook is permitted in your environment.

Warning Do not try to bypass company security controls on a managed device. If macros are restricted by policy, there is usually a security reason.

How to Narrow Down the Cause

The quickest way to solve the problem is to identify whether the block is coming from the file, Excel, or your organization’s security policy.

  1. If the file came from the internet, try unblocking it first.
  2. If the file is stored in a safe folder you use often, add that folder as a trusted location.
  3. If the problem affects all macro workbooks, check Excel macro settings.
  4. If settings are locked or greyed out, ask IT whether a policy is enforcing the block.
  5. If the workbook is saved as .xlsx, confirm that it was not stripped of its macro code.

Once you know which layer is causing the block, the fix usually becomes straightforward. Most personal systems are resolved by unblocking the file or using a trusted location, while workplace systems often require admin approval.

Topics

More from Windows

View all →
Why an AMD GPU Driver Can Show as Disabled After an Update
Windows

Why an AMD GPU Driver Can Show as Disabled After an Update

How to Fix DISM Error 0x800f0915 in Windows
Windows

How to Fix DISM Error 0x800f0915 in Windows

How to Fix Command Prompt When You Can’t Run It as Administrator
Windows

How to Fix Command Prompt When You Can’t Run It as Administrator

5 Ways to Fix HP Support Assistant When It Won’t Install
Windows

5 Ways to Fix HP Support Assistant When It Won’t Install

Why USB Devices Show Up as Unknown in Windows 11
Windows

Why USB Devices Show Up as Unknown in Windows 11

How to Fix the Windows Fast Startup Error 0xc00000d4
Windows

How to Fix the Windows Fast Startup Error 0xc00000d4