Fix: ‘Microsoft Has Blocked Macros From Running’ Error in Excel

Microsoft included additional security features to Microsoft Excel for Windows in 2022 to safeguard users from harmful Excel macros. Microsoft had to take action to protect customers after a sharp rise in hacker attempts to use macros.

Microsoft has blocked macros from running because the source is untrusted
Microsoft has blocked macros from running because the source is untrusted error

This modification by Microsoft prevented macros from operating on files downloaded from the internet. However, since macros are an excellent way to automate Excel and make working on an Excel sheet simpler, the inability to use actual macros may cause some users’ work to become more laborious and decrease their productivity.

What are VBA Macros:

VBA macros are segments of user-written code that function inside MS Office programs. In certain circumstances, they transform MS Excel from a flat spreadsheet into a completely functional GUI application interface by helping to enable custom automation within the files. Bringing the power of VBA to customized client projects makes up a large portion of the work that various business development departments conduct. facilitating the quick development of automation and apps within the exact MS Office products that our clients are already utilizing.

It can be exceedingly challenging to distinguish between valid and malicious VBA code. As a result, all Excel users were affected by the security that Microsoft implemented. 
 
The identical warning notice is shown to files containing absolutely safe macros as well, so there is no need to worry. 
 
This article provides instructions for a quick remedy to help you fix the “Microsoft has blocked macros from running because the source of this file is untrusted” error.

1. Unblock the File from File’s Properties

When you download the file from internet or you import that excel file from another computer, Windows will block it and limit it’s functionality to work properly. This is a security feature but it prevents users from taking full access of the file and use it in applications. If the file is blocked you won’t be able to use macros on that specific excel file. Follow these steps to unblock the file on your Window computer:

  1. Close the Workbook.
  2. Right-click on the Workbook file, and click ‘Properties‘ button.
    Right-click on the Workbook file
    Right-click on the Workbook fil
  3. Make sure the Unblock box in Security is checked under the General tab, then click Apply and OK.
    Unblock box in Security is checked under the General tab
    Unblock box in Security is checked under the General tab
  4. Now open the Workbook again.
  5. Now try running the macros again and check if you are facing the same error again.
    running macros
    running macros

2. Add Trusted Locations.

Microsoft Excel allows you to add trusted locations in it’s directory so that you don’t have to unblock the files again and again. You can simply download the files into the locations you are adding in trusted section which will automatically be recognized by Excel as safe files and it will unblock them automatically.

  1. Press the ‘File‘ button on menu bar.

    Press the 'File' button on menu bar
    Press the ‘File’ button on menu bar
  2. Now press the ‘Options‘ button.

    press the 'Options' button
    press the ‘Options’ button
  3. Navigate to Trust Center > Trust Center Settings > Trusted Locations
     
  4. Inside Trusted Locations, click ‘Add new location‘.

    Inside Trusted Locations, click 'Add new location'
    Inside Trusted Locations, click ‘Add new location’
  5. Press Browse.

    Press Browse
    Press Browse
  6. Choose any folder you want to designate as a trusted location. When opening an excel file from the selected folder, you won’t see the error message again if you download or import the files in the trusted location.
  7. Make sure the option “Sub-folders of this location are also trusted” is checked so that you can still run macros anytime you create a subfolder inside of that folder.
    the option "Sub-folders of this location are also trusted" is checked
    the option “Sub-folders of this location are also trusted” is checked
  8. Re-open the file after moving it to the selected folder. This should now allow you to run macros on any excel file that is present in the Trusted folder.

3. Uninstall and Reinstall Microsoft Excel.

If the earlier fixes require a newer version of this program or the program’s files integrity was compromised, reinstalling Microsoft Excel can repair your issue. With this patch, you can be sure that your copy of Microsoft Excel is the most recent.

To uninstall Microsoft Excel, you will need to follow these steps:

  1. Press the Windows key + R on your keyboard to open the Run dialog.
    open the Run dialog
    open the Run dialog
  2. Type “appwiz.cpl” and press Enter to open the Programs and Features window.
    Type "appwiz.cpl"
    Type “appwiz.cpl”
  3. Scroll through the list of installed programs and locate Microsoft Excel.
  4. Click on Microsoft Excel and then click the “Uninstall” button.
    Click on Microsoft Excel and then click the "Uninstall" button
    Click on Microsoft Excel and then click the “Uninstall” button
  5. Follow the prompts to uninstall Microsoft Excel.

To reinstall Microsoft Excel, you will need to follow these steps:

  1. Go to the Microsoft website and sign in to your account.
  2. Click on the “Office” tab and then click on the “Install” button.The prompts to install Microsoft Excel on your computer will vary depending on your specific operating system and version of Microsoft Excel. However, the general process should be similar to the following:
  3. After clicking on the “Install” button on the Microsoft website, you will be prompted to select the version of Office you want to install. Select whichever one you prefer and then click “Install“.
    click on "Install"
    click on “Install”
  4. You may be prompted to choose between installing the 32-bit or 64-bit version of Office. If you are not sure which version to choose, you can select the default option, which is usually the 32-bit version.
    versions of Microsoft office
    versions of Microsoft office
  5. You may be asked to accept the Microsoft Office License Agreement. Read the agreement and then click “Accept” if you agree to the terms.
    click "Accept"
    click “Accept”
  6. You will be prompted to choose where you want to install Office. You can accept the default location or choose a different location.
  7. The installation process will begin and you may see a progress bar or other indicators showing the progress.
    The installation process
    The installation process
  8. Once the installation is complete, you will be prompted to open an Office application, such as Excel, to finish the activation process.
  9. If the marcos still do not function, repeat the above fixes on this newer installation and maybe this will resolve your issue with the macros error.

Hopefully, these fixes have taken care of your problem with the macros not running error.

ABOUT THE AUTHOR

Muhammad Zubyan


Muhammad Zubyan is a certified Google IT Support Professional with over 7 years of extensive experience. He has worked on more than 1500 computers, gaining valuable insights that enable him to detect and troubleshoot any complicated root cause of Windows-related issues and errors. In addition to managing Appuals as a Senior Editor, he is currently developing his own Game Optimization program that caters to both gamers and casual users alike.