How to fix "Microsoft has blocked macros" (2 simple ways) (2024)

You are probably here because you’ve seen a warning message: Microsoft has blocked macros from running because the source of this file is untrusted. This post provides the background to this message and the steps you should take to enable the file.

During 2022, Microsoft introduced new security into the Windows version of Microsoft Excel to protect users against malicious Excel macros. Due to a significant increase in attempts by hackers to use macros, Microsoft had to take steps to protect users.

It is very difficult to identify VBA code that is legitimate and code which is not. Therefore, the security Microsoft introduced was so wide-reaching that it impacted all Excel users.

Even files with completely safe macros receive the same warning message; therefore, it is not necessarily anything to worry about.

Table of Contents
  • Overview
  • What will you see?
  • How to unblock a macro workbook (Method #1)
  • Trusted locations (Method #2)
  • What about Add-ins?
  • Conclusion

Watch the video


Watch the video on YouTube.

Overview

Macros are a great way to automate Excel; they give us a lot of power to interact with, not just Excel but Windows and other Office applications. Unfortunately, hackers know about this power too, and use files containing macros to distribute malware to PCs and entire networks.

The change introduced by Microsoft automatically blocks all macros in workbooks downloaded from the internet. While it is frustrating to users, it is to ensure online safety, which is of critical importance.

This security change does not just affect Excel; other Office applications are affected too: Access, PowerPoint, Word, and Visio.

Since macros are used to increase productivity by automating Excel, I wanted to let you know how to unblock files. Once they are unblocked, you can use them as usual. This post provides 2 simple ways to unblock macros, so that you don’t receive the Microsoft has blocked macros from running because the source of this file is untrusted message again.

What will you see?

Files downloaded from the internet using the Windows operating system have an attribute added to them, known as the Mark of the Web (MOTW).

Previously, when users opened macro files with the MOTW, a warning appeared that required the user to click Enable Content.

How to fix "Microsoft has blocked macros" (2 simple ways) (1)

Unfortunately, too many users clicked Enable Content without considering whether the file was safe.

With the new behavior, users see a message: “Microsoft has blocked macros from running because the source of this file is untrusted”. This will be the same message for all macro-enabled files downloaded from the internet; therefore, even safe macros trigger this warning.

How to fix "Microsoft has blocked macros" (2 simple ways) (2)

Clicking Learn More takes you to a web page detailing the reasons for this message and provides instructions on how to enable the file for use: https://support.microsoft.com/en-gb/topic/a-potentially-dangerous-macro-has-been-blocked-0952faa0-37e7-4316-b61d-5b5ed6024216

How to unblock a macro workbook (Method #1)

The first method is to unblock the file. This requires a few extra clicks. By adding these additional steps, Microsoft hopes users will only enable files they trust.

The steps to unblock a file are as follows:

  1. Close the workbook
  2. Navigate to the location where the workbook is saved
  3. Right-click on the file and select Properties from the menu
    How to fix "Microsoft has blocked macros" (2 simple ways) (3)
  4. Check the Unblock box, then click OK
    How to fix "Microsoft has blocked macros" (2 simple ways) (4)

Now the workbook is unblocked, and the macros can run. It is essential to only unblock files from sources that you trust.

That was simple enough; it only required a few additional clicks. However, as we perform this file-by-file, it could become time-consuming for many users. So, next, we look at another method that removes the block for lots of files.

Trusted locations (Method #2)

The second method uses a “trusted location”. Any workbooks saved in trusted locations bypass the macro security and are not blocked by default.

To find out which locations are trusted or add new ones, go to File > Options > Trust Center Settings… > Trusted Locations.

How to fix "Microsoft has blocked macros" (2 simple ways) (5)

To add a new trusted location, click the Add new location… button and follow the on-screen prompts.

Once set up, trusted locations are easy to use. Just save the file in the trusted folder, and open it as usual. The warning message should not appear, and you can use the file.

Obviously, take care only to save files you trust in a trusted location.

What about Add-ins?

Excel VBA Add-ins behave in the same way as before the security change. It has been necessary to unblock add-ins for several years; therefore, this behavior has not changed.

Conclusion

Online security is critical, so Microsoft has taken steps to help users stay safe. While you may not have the feature that blocks downloaded macros yet, Microsoft indicated that it will roll out this feature to Excel 2013 and later (https://docs.microsoft.com/en-gb/DeployOffice/security/internet-macros-blocked).

At least now, if you receive the Microsoft has blocked macros… warning again, you will know what to do.

Did either method in this post fix your problem? Let us know in the comments. Also, please comment if you have an alternative approach to fix this issue.

What next?

Discover how you can automate your work with our Excel courses and tools.

How to fix "Microsoft has blocked macros" (2 simple ways) (6)

Excel Academy
The complete program for saving time by automating Excel.

Find out more

How to fix "Microsoft has blocked macros" (2 simple ways) (7)

Excel Automation Secrets
Discover the 7-step framework for automating Excel.

Find out more

How to fix "Microsoft has blocked macros" (2 simple ways) (8)

Office Scripts: Automate Excel Everywhere
Start using Office Scripts and Power Automate to automate Excel in new ways.

Find out more

How to fix "Microsoft has blocked macros" (2 simple ways) (2024)

FAQs

How to fix "Microsoft has blocked macros" (2 simple ways)? ›

To do this, go to File > Options > Trust Center > Trust Center Settings > Macro Settings. Ensure that the setting is not set to "Disable all macros without notification". You can choose "Enable all macros" or "Disable all macros with notification" depending on your security preferences.

How do I unblock a blocked macro? ›

Excel 2010, 2013, 2016, 2019, and Microsoft 365:
  1. Open the File: Open the Excel file containing the blocked macros.
  2. Go to the File Tab: Click on the "File" tab in the ribbon.
  3. Open Options: ...
  4. Navigate to Trust Center: ...
  5. Open Trust Center Settings: ...
  6. Navigate to Macro Settings: ...
  7. Enable Macros: ...
  8. Click OK:
Mar 19, 2023

How to fix Microsoft has blocked macros from running because the source of this File is untrusted Excel? ›

To do this, go to File > Options > Trust Center > Trust Center Settings > Macro Settings. Ensure that the setting is not set to "Disable all macros without notification". You can choose "Enable all macros" or "Disable all macros with notification" depending on your security preferences.

How do I unblock macros in Access? ›

Step 1 – Launch MS Access. Click on “Options”: Step 2 – Click on “Trust Center”, then on “Trust Center Settings”, “Macro settings”, select “Enable all macros” and click OK: Step 3 – Exit MS Access.

How to fix #blocked in Excel? ›

Check the permission on the file, Select Enable Content on the trust bar, or check the security and privacy options in the Microsoft Office Trust Center.

How do I unblock everything that is blocked? ›

One of the easiest ways to unblock websites is with a public web proxy. It may not be as fast or secure as a VPN, but a public web proxy is a good option when you use public PCs that don't let you install a VPN. Proxies hide your IP address and route your internet traffic through different public servers.

How do I bypass unblock? ›

Let's take a look at a few different solutions you can try if you cannot access certain websites due to blocks.
  1. Use a VPN to unblock any site you want. ...
  2. Unblock sites with an open proxy. ...
  3. Install a VPN or proxy browser extension. ...
  4. Use an IP address instead of a URL. ...
  5. Use the Tor Browser to unblock banned sites.

How do I unblock security in Excel? ›

Change external content settings for Excel in the Trust Center
  1. In Excel, click the File tab.
  2. Click Options > Trust Center > Trust Center Settings.
  3. On the left, select External Content.
  4. Click the option that you want under Security settings for Data Connections:

How do I turn off macro error? ›

You can do this by going to File > Options > Trust Center > Trust Center Settings > Macro Settings in Excel. You can choose to enable all macros, disable all macros, disable all macros with notification, or disable all macros except digitally signed macros.

How do I unblock macros on Mac? ›

Enable or disable macros in Office for Mac
  1. Click the Word, Excel, or PowerPoint menu as appropriate.
  2. Click Preferences.
  3. Click Security & Privacy. To allow all macros to run select the Enable all macros radio button. Caution: This will allow ALL macros, both good and bad, to run without any further warning.

How do I unlock a macro workbook? ›

Use Alt+F11 to enter the macro editor. Once in VBA double click the sheet you need to unlock from the menu listing on the left. This will open the general declarations page for the sheet. Sub PasswordBreaker() 'Breaks worksheet password protection.

How do I enable blocked macros in Word? ›

In Word click the File tab, click Options, click Trust Center, and then click Trust Center settings. Click Macro settings. Under Macro settings, click Enable all macros.

How do I unblock blocked content in Excel? ›

Change external content settings for Excel in the Trust Center
  1. In Excel, click the File tab.
  2. Click Options > Trust Center > Trust Center Settings.
  3. On the left, select External Content.
  4. Click the option that you want under Security settings for Data Connections:

References

Top Articles
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 6070

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.