how to unblock macros in excel

Gerard Wright 0 Reputation points
2025-11-12T17:56:44.09+00:00

I need to run a report in Excel that has Macros. I have the Security Risk notice saying that Microsoft has blocked macros from running because it is from an untrusted source. I have tried to follow the instructions for unblocking, but I don't see what was recommended for unblocking this file.

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

3 answers

Sort by: Most helpful
  1. Hendrix-C 8,905 Reputation points Microsoft External Staff Moderator
    2025-11-12T18:41:00.3+00:00

    Hi @Gerard Wright,

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

    To help you resolve this issue, may I ask which instructions that you have tried to unblock Macros in your file but failed?

    In the meantime, I suggest you should check this guideline to try unblocking macros in your files if there is any step you haven't tried: 

    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- Adjust the trust center settings for macros  

    • Go to File > Options > Trust Center > Trust Center Settings 
    • Click Macro Settings and choose "Enable VBA macros" (only if you're 100% sure the file is safe) 
    • Then click OK to save the settings 

    For better visualization about this guideline, you can watch this video Microsoft has blocked macros from running because the source of this file is untrusted Excel - FIX

    (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

    1 person found this answer helpful.
    0 comments No comments

  2. Q&A Assist
    2025-11-12T17:57:37.7266667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To unblock macros in Excel, you can follow these steps depending on the scenario of your file:

    1. Individual Files:
      • Right-click on the file, select Properties, and check the Unblock checkbox on the General tab.
      • Alternatively, you can use the Unblock-File cmdlet in PowerShell to remove the Mark of the Web from the file.
    2. Files on a Network Share or Trusted Website:
      • If the file is located on a network share, you can unblock it using the same method as for individual files.
      • If you want to trust all files in that network location, designate the location as a Trusted site or add it to the Local intranet zone.
    3. Files Stored on OneDrive or SharePoint:
      • Open the file using the Open in Desktop App option.
      • If you download the file locally, make sure to remove the Mark of the Web from the local copy as described in the individual files section.
      • Designate the location as a Trusted site if necessary.

    If you do not see the Unblock checkbox, it may be due to the file being on a network share that is considered part of the Internet zone. In that case, you may need to adjust your security settings or consult your IT department for assistance.

    0 comments No comments

  3. Gerard Wright 0 Reputation points
    2025-11-12T20:02:35.0533333+00:00

    I saved the excel file to my local drive. Then I went to the Trust Center and added the file location to the trusted locations. This solved my blocked Macros problem.


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.