Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (2024)

Microsoft Excel macros can help you save a lot of time and effort by allowing you to automate repetitive tasks. Unfortunately, malicious actors can easily exploit macros and embed potentially dangerous code. As a result, you may encounter the ‘Microsoft has blocked macros’ error in Excel on your Windows 10 or 11 computer, leaving you confused about how to unblock them.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (1)

It can be annoying when Microsoft Excel blocks macros on spreadsheets you have created or obtained from a coworker. Below, we have compiled a list of useful tips that should help fix the error and allow you to use macros in Excel.

1. Unblock the File

Microsoft Excel may block macros for a spreadsheet if you have obtained it from another computer or the internet. If that’s the case, you will need to unblock the Excel file to fix the error.

Step 1: Locate and right-click on the problematic file and select Properties.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (2)

Step 2: Under the General tab, tick the Unblock option. Then, hit Apply followed by OK.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (3)

Try opening the spreadsheet again and check if the error still appears.

2. Enable Macros Manually

If the macros don’t work after you unblock the Microsoft Excel spreadsheet, you can try enabling them manually. Before you proceed, it’s important to note that macros can pose a security risk. Hence, you should only enable macros manually if you have received the file from a trusted source.

Step 1: Open your Excel spreadsheet and click the File menu in the top left corner.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (4)

Step 2: Switch to the Info tab, click the Enable Content menu, and select Enable Content.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (5)

Once you complete the above steps, Excel will enable macros for the specified file.

3. Mark the Folder Containing Your Files as a Trusted Location

Are you encountering the ‘Microsoft has blocked macros from running’ error with multiple spreadsheets? If so, individually enabling macros for each file can be tiresome. Instead, you can mark the folder containing your Excel spreadsheets as a trusted location in Excel. Once you do, Excel will allow macros from all spreadsheets stored in that folder.

Step 1: Open Microsoft Excel and click the File menu in the top left corner.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (6)

Step 2: Select Options in the bottom left corner.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (7)

Step 3: Switch to the Trust Center tab and click the Trust Center Settings button.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (8)

Step 4: In the Trusted Locations tab, click the Add new location button.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (9)

Step 5: Click the Browse button and select your your Excel spreadsheet folder. Then, click OK.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (10)

Restart Excel after this and check if the error still pops up.

4. Check Group Policy Settings

Another reason Microsoft Excel may block macros on your Windows computer is if an administrator has enabled the ‘Block macros from running in Office files from the internet’ policy. Here’s what you can do to change that and unblock macros in Excel.

Note that this only applies to those running the Professional, Education, and Enterprise editions of Windows, as Group Policy is not available on the Windows Home edition.

Step 1: Press the Windows + R keyboard shortcut to open the Run dialog box. Type gpedit.msc in the text box and hit OK.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (11)

Step 2: When the User Account Control (UAC) prompt appears, select Yes to proceed.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (12)

Step 3: Use the left pane to navigate to the following folder:

User Configuration\Administrative templates\Microsoft Excel 2016\Excel options\Security Trust Center

Step 4: Double-click the ‘Block macros from running in Office files from the internet’ policy in the right pane.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (13)

Step 5: Select Disabled and then hit Apply followed by OK.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (14)

5. Run the Office Repair Tool

If nothing works, there may be an issue with some of the core app files associated with Excel. In that case, you can run Microsoft’s Office repair tool, automatically fixing problems with all your Office apps.

Step 1: Press the Windows key + R keyboard shortcut to open the Run dialog box. In the Open field, type appwiz.cpl and press Enter.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (15)

Step 2: In the Programs and Features window, locate the Microsoft Office suite or Microsoft 365. Right-click on it and select Change.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (16)

Step 3: Select Online Repair and click the Repair button to continue.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (17)

Unleash Efficiency With Macros

Using Microsoft Excel day in and day out for work can be inconvenient when it blocks macros and prevents you from automating tasks. Applying the above tips should help unblock macros in Microsoft Excel and allow you to resume your work.

Was this helpful?

Thanks for your feedback!

The article above may contain affiliate links which help support Guiding Tech. The content remains unbiased and authentic and will never affect our editorial integrity.

Top 6 Fixes for Microsoft Has Blocked Macros Error in Excel for Windows (2024)

FAQs

How to fix Microsoft has blocked macros from running on Excel? ›

- Select Options at the bottom of the left bar. - In the left-side pane, choose Trust Center, and then click Trust Center Settings. - In the Trust Center dialog box, click Macro Settings on the left. - Select "Enable all macros" and click OK.

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 remove macro protection in Excel? ›

You can also access the Trust Center in Excel Options. To do that, click Options, and then click Trust Center > Trust Center Settings > Macro Settings. For more information about macro security, see the following topics: Add, remove, or change a trusted location.

How do I remove a macro virus in Excel? ›

If you think one of your Microsoft Word or Excel files has a macro virus, open the document in Safe Mode. Then select View and double-click the Macros icon. From there, go to Organizer and then use the dropdown to find the infected file. Then, all you need to do is delete it and it should remove it from the file.

How do I skip macro errors? ›

We need to add the “On Error Resume Next” statement to ignore this error. As you can see above, we have added the statement at the top of the code before any lines start. Now, run the code and see what happens. Now, we are in the line given the error previously, press the F8 key, and see what happens.

How do you handle macro errors? ›

You do this by including an On Error statement in your macro. When a runtime error occurs, the On Error statement transfers control to an error-handling routine. To trap errors, you must set your error trap above the point in the procedure where errors are likely to occur.

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.

Why can't I enable macros in Excel? ›

Excel Add-ins: Sometimes, conflicting Excel add-ins can cause issues with macros. Try disabling any third-party add-ins and then attempt to enable macros again. Create a New Workbook: Create a new workbook, add a simple macro to it, and see if you can enable macros in the new workbook.

How do I stop Microsoft from blocking macros in Excel? ›

To unblock macros in a file, like one from the internet or an email attachment, remove the Mark of the Web on your local device. To remove, right-click on the file, choose Properties, and then select the Unblock checkbox on the General tab.

How to fix macro issues in Excel? ›

Re: macro problem in excel

Ensure the macros are saved in the workbook and try reopening it. Check for any filtering or sorting in the macro list, and if the problem persists, consider exporting the macros, creating a new workbook, and importing them back in.

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

Go to "File" > "Options" > "Trust Center" > "Trust Center Settings" > "Macro Settings." Make sure that "Enable all macros"(not recommended; potentially dangerous code can run)" is selected.

How do I stop Microsoft from disabling macros in Excel? ›

Make a document trusted to enable macros

If you see a security warning when you open a document or try to run a macro, you can choose to make it a trusted document and enable macros. This example is on an Excel workbook. Select Enable Content. In the Security Warning dialog, select Yes to make the document trusted.

Why won't Excel let me run a macro? ›

Navigate to "Macro Settings." Upon opening the Trust Center, you can see settings to keep your documents safe and maintain the security of your data. To find "Macro Settings," click the "Trust Center Settings" option and then the "Macro Settings" option. Enable all macros.

Top Articles
Latest Posts
Article information

Author: Arline Emard IV

Last Updated:

Views: 5620

Rating: 4.1 / 5 (52 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Arline Emard IV

Birthday: 1996-07-10

Address: 8912 Hintz Shore, West Louie, AZ 69363-0747

Phone: +13454700762376

Job: Administration Technician

Hobby: Paintball, Horseback riding, Cycling, Running, Macrame, Playing musical instruments, Soapmaking

Introduction: My name is Arline Emard IV, I am a cheerful, gorgeous, colorful, joyous, excited, super, inquisitive person who loves writing and wants to share my knowledge and understanding with you.