How to unblock macro in a excel file

Williams, Tiffney 0 Reputation points
2025-12-08T17:43:45.6966667+00:00

How do I permanently unblock macros on an Excel file

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-08T17:43:55.05+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To unblock macros in an Excel file, 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 macros to run.
    2. Use PowerShell: Alternatively, you can use the PowerShell cmdlet Unblock-File to remove the ZoneId value from the file, which also allows macros to run by default.
    3. Trusted Locations: If you frequently use certain files, consider saving them in a Trusted Location. This will allow macros to run without being blocked.
    4. Digital Signatures: For macro-enabled files, you can also trust the publisher of the macros by using a digital signature, which will allow the macros to run without being blocked.

    By following these methods, you can effectively unblock macros in your Excel files permanently.


    References:

    0 comments No comments

  2. Hendrix-C 8,315 Reputation points Microsoft External Staff Moderator
    2025-12-08T18:09:25.8+00:00

    Hi @Williams, Tiffney,

    Thank you for posting your question in the Microsoft Q&A forum.  

    The previous response by Q&A Assist does provide basic troubleshooting steps for unblocking macros and I suggest you can try them to see if it helps. The guideline I provide below will have some steps as same as the previous reply but with some more detailed explanation:

    1- Remove the Mark of the Web (MOTW)  

    • Open File Explorer, navigate to your Excel file that you need to enable macros 
    • Right click on it and choose Properties 
    • In General tab, check the Unblock box for the Security option. 

    User's image

    • If the Unblock options is not available, it's usually because that your file is currently saved in a OneDrive or SharePoint folder and it will be considered as from the internet.
    • You can try disconnecting OneDrive/SharePoint temporarily or move the file to your local folder and try the Unblock Security box again.

    2- Add the file location as a trusted location  

    • Open Excel and go to File > Options > Trust Center > Trust Center Settings

    User's image

    • Select Trusted Locations in the left bane > Add new location > Browse and navigate to the folder where you keep the files need to enable macro 
    • Press OK to close all the dialog boxes then try opening your macro-enabled excel file again 

    3- Enable macros in Excel 

    • Open the Excel file that needs macro enabling.
    • If you see a yellow warning bar at the top with the message "SECURITY WARNING: Macros have been disabled", click Enable Content to enable macro for the file 

    You can also adjust the trust center settings for macros by 

    • Go to File > Options > Trust Center > Trust Center Settings 
    • Click Macro Settings and choose between "Disable VBA macros with notification" (which will show a yellow warning bar as I mentioned above) and "Enable VBA macros" (only if you're sure the file is safe) 
    • Then click OK to save the settings

    For better visualization about this guideline, you can watch this video Unblock macros downloaded from the internet | Excel Off The Grid | Microsoft macro security changes… 

    (Note: We're providing this information as a convenience to you. The sites are not controlled by Microsoft and we can't make any representations regarding quality, safety or suitability of any software or information found there. Please make sure you completely understand the risk before retrieving any suggestions from the above link) 

    Please understand that our initial response does not always resolve the issue immediately. However, you can try workaround and share us more detailed information, we can work together to find a solution.    

    Thank you for your understanding and cooperation. I'm looking forward to your reply.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".       

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread

    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.