Unblock a maco in excel that I created

Freddy Killen 0 Reputation points
2025-12-04T21:56:25.9066667+00:00

I created a macro in Excel and now it is blocked and I cannot find a way to unblock it

Windows for home | Windows 11 | Files, folders, and storage
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-04T21:56:37.2233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To unblock a macro in Excel that you created, you can follow these steps:

    1. Remove Mark of the Web: Right-click on the Excel file, select Properties, and then check the Unblock checkbox on the General tab. This will remove the Mark of the Web from the file, allowing the macro to run.
    2. Using PowerShell: Alternatively, you can use the PowerShell cmdlet Unblock-File to remove the ZoneId value from the file. This action has the same effect as unchecking the Unblock checkbox.
    3. Trust the Source: If you trust the source of the macro, you can also save the file to a Trusted Location in Excel. This will allow macros to run without being blocked.
    4. Digital Signature: If applicable, you can use a digital signature and trust the publisher of the macro to allow it to run without being blocked.

    After performing these actions, reopen the Excel file, and the macro should now be unblocked and functional.

    0 comments No comments

  2. Vikki-T 1,520 Reputation points Microsoft External Staff Moderator
    2025-12-06T08:56:41.3666667+00:00

    Dear Freddy Killen

    Thank you for your question and for sharing the details into Microsoft Q&A Forum. 

    I understand how frustrating it can be when a macro you created is blocked and you’re unable to run it. Let’s work through some detailed steps to help you unblock your macro and get back to work smoothly. Before diving into our detailed steps, please take a moment to read the initial AI response**,** it’s accurate and worth reviewing. In addition, we’ve included some similar steps below but with more detailed instructions to make the process easier for you: 

    1. Use PowerShell (if Unblock option isn’t visible) 

    • Open PowerShell and run the following command: 

    Unblock-File -Path "C:\Path\To\Your\ExcelFile.xlsm" 

    • Replace "C:\Path\To\Your\ExcelFile.xlsm" with the actual file path. 
    1. Add a Trusted Location (Optional) 

    If you frequently use macros, consider saving your files in a trusted folder: 

    • Go to File > Options > Trust Center > Trust Center Settings > Trusted Locations. 
    • Click Add new location, then select the folder where you’ll store macro-enabled files. 

    3. Trust the Publisher (if applicable) 

    If your macro is digitally signed: 

    • Go to File > Info > Trust Center > Trust Center Settings > Trusted Publishers. 
    • Add the publisher’s certificate to allow macros from this source. 

    We hope these steps help you unblock your macro and continue working without interruptions. Wishing you a smooth experience with Excel and successful automation of your tasks! Thank you for choosing Microsoft.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.