Share via

excel file block

Portillo, Raquel 0 Reputation points
2026-03-04T16:54:12.33+00:00

I have to use a excel file with macros but in the top of the file display the following message : "Microsoft has blocked macros from running because the source of this file is untrusted" how can I unblocked the file? I already use the process step to unblock a word file, I've saved the file, but in General tab doesnt appear this message to unblock

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Hendrix-C 15,905 Reputation points Microsoft External Staff Moderator
    2026-03-04T17:16:42.93+00:00

    Hi @Portillo, Raquel,

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

    According to your concern, I suggest following this standard guideline to try unblocking macros in your files: 

    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 "Unlock" checkbox isn't available, you can use PowerShell to unlock your file's macro (if your device has permission to use PowerShell):

    • In the search bar, type PowerShell and select "Run as administrator."
    • Then, paste this script into PowerShell > Enter to unlock your file:
      Unblock-File -Path "C:\Path\YourFile.xlsm"
    

    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

    • Go to File > Options > Trust Center > Trust Center Settings 
    • Click Macro Settings and choose "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… 

    (This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.)

    For further assistance, please share more details about the file location, is it stored/opened from local disk (C:), OneDrive, Email attachment, network drive, etc. or was the file downloaded from the internet?

    Please understand that my initial response does not always resolve the issue immediately. However, you can try these steps and let me know if it works for you. If not, we can work together to find a solution.

    If you have any questions or need further assistance, please feel free to share them in the comments on this post so I can continue to support you.    

    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.

    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

    Was this answer helpful?


  2. Q&A Assist
    2026-03-04T16:54:31.12+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To unblock the Excel macro file when the “Unblock” checkbox is missing, use one of these supported approaches depending on where the file is stored.

    1. If the file is saved locally (NTFS drive)
    • Make sure the file is actually on a local NTFS drive (e.g., C:\Users\…\Documents) and not opened directly from email or a temporary folder.
    • Right‑click the file > Properties.
    • If the Unblock checkbox appears under Security on the General tab, select it and click OK. This removes Mark of the Web and allows macros to run.

    If the checkbox still does not appear, the file may not have Mark of the Web, or it may be on a share that is treated as Internet zone.

    1. If the file is on a network share or website When files are on a network share or a web location, the Unblock checkbox might not be shown or might have no effect if the share is considered in the Internet zone.

    In that case, use one of these options:

    • Move/download the file to a local folder and then use Unblock as above.
    • Or, have an admin:
      • Designate the network location as a Trusted site, or
      • Add the location to the Local intranet zone.

    Once the location is in Trusted sites or Local intranet, macros from that location are not blocked by default. This should be done carefully, because all files from that location will then be treated as trusted.

    1. If the file is on OneDrive or SharePoint For files stored in OneDrive or SharePoint (including Teams channel libraries), use one of these options:
    • Open the file using Open in Desktop App from the OneDrive/SharePoint/Teams web UI. Files opened this way do not get Mark of the Web.
    • If downloading first:
      • Download the file to a local folder.
      • Right‑click > Properties > Unblock (if available).
    • An admin can also:
      • Add the SharePoint/OneDrive domain to Trusted Sites using the “Site to Zone Assignment List” Group Policy so that downloaded files from that domain do not have macros blocked.
    1. If macros are still blocked by policy Even after removing Mark of the Web or trusting the location, macros can still be blocked by organization policy. In that case, an admin must review and adjust:
    • The Block macros from running in Office files from the Internet policy, and/or
    • The VBA Macro Notification Settings (Excel “Macro Notification Settings”) policy under Group Policy.

    These policies control whether macros from the internet are blocked, allowed, or allowed with notification.


    References:

    Was this answer helpful?

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.