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.
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:
- Close the Workbook.
- Right-click on the Workbook file, and click ‘Properties‘ button.
- Make sure the Unblock box in Security is checked under the General tab, then click Apply and OK.
- Now open the Workbook again.
- Now try running the macros again and check if you are facing the same error again.
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.
- Press the ‘File‘ button on menu bar.
- Now press the ‘Options‘ button.
- Navigate to Trust Center > Trust Center Settings > Trusted Locations
- Inside Trusted Locations, click ‘Add new location‘.
- Press Browse.
- 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.
- 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.
- 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:
- Press the Windows key + R on your keyboard to open the Run dialog.
- Type “appwiz.cpl” and press Enter to open the Programs and Features window.
- Scroll through the list of installed programs and locate Microsoft Excel.
- Click on Microsoft Excel and then click the “Uninstall” button.
- Follow the prompts to uninstall Microsoft Excel.
To reinstall Microsoft Excel, you will need to follow these steps:
- Go to the Microsoft website and sign in to your account.
- 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:
- 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“.
- 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.
- You may be asked to accept the Microsoft Office License Agreement. Read the agreement and then click “Accept” if you agree to the terms.
- You will be prompted to choose where you want to install Office. You can accept the default location or choose a different location.
- The installation process will begin and you may see a progress bar or other indicators showing the progress.
- Once the installation is complete, you will be prompted to open an Office application, such as Excel, to finish the activation process.
- 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.