When downloading spreadsheets online, you may notice an error message below the Excel ribbon that reads “Microsoft has blocked macros from running…”. This may prompt you to quickly enable macros from your Trust Center Settings. However, when coming back to the sheet, you can’t really use the macro.
Especially if you’re just starting off with Excel, this issue can be really frustrating. But, there is a way to make your macros work, and that is by unblocking them from file properties.
Why Does Excel Block Macros?
Macros are created using the Visual Basics (VBA) language. As Excel also runs on the same language, Macros can interfere with the program’s tools, features, and even shortcuts.
You may be expecting these changes when opening a spreadsheet containing macros from a trusted source. But, if you have downloaded the sheet online, you may not know the changes the macro can bring to the sheet. Therefore, Excel blocks macros by default.
In other cases, your Macro may be blocked not only by Excel but also by Windows. When this happens you will not only have to enable your Macro from the Trust Center Settings, but also unblock the spreadsheet as a whole from the file properties.
Windows, by default, will block spreadsheets containing macros that were downloaded online. The reasoning for this is quite similar to why Excel blocks macros within the program. Macros from untrusted sources can prompt Windows to delete important program files, and also cause files to go corrupt.
What to do if the Source of the File is Untrusted?
So, you want to extend the functionality of Excel using a macro. Instead of creating a macro from scratch, you chose to install a spreadsheet that already contains the macro. In these situations, you do not trust the source of the macro but would want to enable macros anyway.
Logically, I would ask you not to unblock macros as there isn’t a way Excel can remove viruses created using macros. However, there are exceptional situations. For times like these, you can enable editing mode and first view the code the macro uses. If the code looks safe, then you can unblock the spreadsheet to run the macro.
Verify if the Macro is Safe
Make sure you’ve enabled the Developer tab in Excel then follow these steps to view the code used in a macro in Excel.
- Open the sheet and select the Enable Editing button next to the warning.
- Go to the Developer tab.
- From the Code section, select Visual Basic.
- Expand the Class Modules. You can identify them through the folder icons in Project Explorer (Ctrl + R).
- Double-click on each Module to view its code.
How to Unblock Macros in Excel
When a macro goes against your device’s security protocols, it’s your device that blocks the macro; not Excel. Therefore you’ll have to unblock the spreadsheet from the file properties.
Once you’ve verified the macro’s security, you can finally unblock the spreadsheet containing the macro. Remember, only unblock macros you can trust.
- Open File Explorer and head to the location of your sheet.
- Right-click on your spreadsheet.
- Select Properties.
- In the Security section, check the box next to Unblock.
- Click OK.