Excel Macro Blocked

ANTHONY ORZECHOWSKI 0 Reputation points
2025-12-04T13:57:13.62+00:00

I have an Excel file on my onedrive and it has a macro. It is a safe file. When I open it I cannot run the macro because it is blocked. There is no enable button provided. I cannot see a means with properties on the file to unblock it either.

How can I unblock this and tell others how to do it also?

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

2 answers

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

    To unblock a macro in an Excel file stored on OneDrive, you can follow these steps:

    1. Open in Desktop App: If you are accessing the file through the OneDrive website, try using the Open in Desktop App option. This method usually prevents the file from having the Mark of the Web, which blocks macros.
    2. Remove Mark of the Web: If you have downloaded the file locally, you can remove the Mark of the Web by right-clicking on the file, selecting Properties, and then checking the Unblock checkbox on the General tab. However, this option may not be available for files on a network share or if the file is still in OneDrive.
    3. Trusted Locations: You can also set the OneDrive domain as a Trusted Site in the Windows Internet Options. This can be done through the Group Policy Management Console by adding https://{your-domain-name}.sharepoint.com (for SharePoint) or https://{your-domain-name}-my.sharepoint.com (for OneDrive) to the Trusted Sites zone. This will allow macros to run without being blocked.
    4. Sync Client: If you have the OneDrive sync client running, files synced to your local device from OneDrive should not have the Mark of the Web, allowing macros to run without issues.

    By following these steps, you should be able to unblock the macro and share these instructions with others who might face the same issue.

    0 comments No comments

  2. Tamara-Hu 8,635 Reputation points Microsoft External Staff Moderator
    2025-12-04T14:40:30.72+00:00

    Hello @ANTHONY ORZECHOWSKI,   

    Good day! Thank you for posting your valuable question on Microsoft Q&A forum.  

    Before providing the accurate solution, please confirm these additional information:  

    • Are you using a personal account(hotmail, gmail, yahoo,…) or a work/school account(has a domain or school name) to sign in Excel?  
    • What is your Excel version (Microsoft 365 subscription or other version) ?  
    • Are you using the desktop version of Excel or Excel Online? 
    • What is your operating system (Windows, MacOS,…)? 
    • Did you download this file to your local device or use it directly from the OneDrive folder? 
    • Can you share some detailed screenshots of this issue? Including this information:  
      • The error message you received when using this file.  
      • Go to File > Options > Trust Center > Trust Center Settings... and screenshot your Macro Settings, Trusted Documents, Trusted Locations.  

    Your additional information will much help finding the root cause of your issue. I appreciate your effort that help provide the accurate solution.  

    In the meantime, here are a few steps you can try: 

    Download the File 

    Remove the Security Block 

    • Locate the downloaded file on your computer. 
    • Right-click the file and select Properties. 
    • In the General tab, look for the Security section at the bottom. 
    • If you see the message “This file came from another computer and might be blocked”, check Unblock. 
    • Click Apply, then OK.

     User's image

    Add Trusted Locations 

    • Open the Excel file.  
    • Navigate to Trust Center Settings: File > Options > Trust Center > Trust Center Settings  
    • Go to Trusted Locations. If you see Disable all Trusted location is checked, please uncheck it. 
    • Click Add new location > Click Browse to find the folder, select a folder, and then click OK. 

    User's image

    • If the issue persists: In the same Trusted Locations settings, click Add new location, then enter the following path in the text box that appears: 
      • For personal account: https://d.docs.live.net   
      • For business account: Go to File > Scroll down to find the file you've just opened > Right click and choose Open file location > Copy the file address to put in the text box.  

    User's image

    • Click the checkbox "Subfolders of this location are also trusted"  
    • Click Ok and Restart excel.  

    Note: This will trust macros in all files stored in your OneDrive. For security, I recommend only saving and opening files from sources you trust.  

    Please understand that our initial response does not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution.   

    If you need further assistance, feel free to reply. Thank you for reaching out! 


    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.


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.