How to enable macros on Microsoft excel even though I keep unblocking them it still appears?

Anahi Fabian 0 Reputation points
2025-11-07T20:26:12.36+00:00

I tried the option to right click the file >properties>hit unblock>apply>okay but it does not work and I don't know why. I opened the excel file again and I still get the "Security risk: Microsoft has blocked macros from running because the source of this file is untrusted", And yes, it is from a trusted cite. I hope you guys can help because I tried everything but has not worked.

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

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-07T20:26:58.1133333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To enable macros in Excel, especially if you are encountering the "Security risk: Microsoft has blocked macros from running because the source of this file is untrusted" message, you can follow these steps:

    1. Unblock the File: You mentioned you have already tried unblocking the file via Properties. Ensure you are doing this correctly:
      • Right-click the file, select Properties.
      • In the General tab, check the Unblock checkbox if it appears, then click Apply and OK.
    2. Open in Desktop App: If the file is stored on OneDrive or SharePoint, try opening it directly in the Desktop App. This can prevent the Mark of the Web from being applied to the file, which blocks macros.
    3. Trusted Locations: Add the folder where the file is located to the Trusted Locations in Excel:
      • Go to File > Options > Trust Center > Trust Center Settings > Trusted Locations.
      • Click Add new location and specify the folder path.
    4. Check Macro Settings: Ensure your macro settings allow macros to run:
      • Go to File > Options > Trust Center > Trust Center Settings > Macro Settings.
      • Choose Disable all macros with notification or Enable all macros (not recommended for security reasons).
    5. Group Policy Settings: If you are in a managed environment (like a school or organization), there might be Group Policy settings that enforce macro blocking. You may need to contact your IT department to check if they have policies that prevent macros from running.

    If you have followed these steps and still face issues, it might be necessary to check for any additional security settings or policies that could be affecting macro execution in your environment.


    References:

    0 comments No comments

  2. Alexis-NG 9,355 Reputation points Microsoft External Staff Moderator
    2025-11-07T22:08:30.27+00:00

    Since you haven’t specified your account type, I may not be able to provide an exact solution. However, assuming you're using a school account managed and provided by your school, you may consider the following guide.

    Hi @Anahi Fabian,

    Thank you for reaching out to Microsoft Q&A Forum.

    In this case, you’re hitting Excel’s “Blocked macros from untrusted source” protection, which kicks in whenever the file carries an Internet “mark” or isn’t in a trusted location. Unblocking in Properties often isn’t enough, especially if the file lives in OneDrive/SharePoint/Teams or a network drive.

    Typically, in an enterprise environment, when you see the banner below:

    User's image

    It means macros from internet are blocked by default in Office. In the past, you can see a yellow banner give you the ability to enable macros. VBA macros are a common way for malicious actors to gain access to deploy malware and ransomware. Therefore, to help improve security in Office, Microsoft is changing the default behavior of Office applications to block macros in files from the internet.

     

    The Learn More button goes to an article for end users and information workers that contains information about the security risk of bad actors using macros, safe practices to prevent phishing and malware, and instructions on how to enable these macros (if needed).

     

    As an end user you can try to do some slightly more advance workarounds:

     

    To begin, please make sure the file is saved in a macro-enabled format: .xlsm, .xlsb, or a template .xltm.

    You can try to put the file in a Trusted Location since Excel will always allow macros from folders you mark as trusted.

    1. Open the workbook in Excel.
    2. Go to File → Options → Trust Center → Trust Center Settings… → Trusted Locations.
    3. Click Add new location…, browse to a local folder you control (e.g., C:\Users\<you>\Documents\ExcelTrusted\), and OK.
    4. Move or save your macro workbook into that folder and reopen it. Avoid using synced cloud folders (OneDrive/SharePoint) for the trusted location unless you must; local paths are simplest. If file is from OneDrive/SharePoint, download it and save it to a local trusted folder. Files in Trusted Locations bypass the “untrusted source” check and open with macros enabled (subject to your macro settings).

    If the file was downloaded (Internet mark persists), Windows tags downloaded files with an Internet Mark (Zone.Identifier). That mark can persist even after “Unblock” if the file is copied through certain apps or storage. You can try two alternatives:

    • Resave into the trusted folder from Excel (File → Save As).
    • Or re‑download the file directly into your trusted folder.
    • If you’re comfortable with advanced steps, you can remove the Internet security mark using PowerShell (run as your account): Note: Only do this for files you fully trust. You must have local administrator privileges to execute PowerShell commands.  You can read through this article about PowerShell commands: Getting Started with PowerShell - PowerShell | Microsoft Learn
    • You can use PowerShell "Get-Item "C:\Path\To\File.xlsm" | Unblock-File", it's a built-in cmdlet for removing MOTW.
    • If you use Remove-Item 'C:\Path\YourWorkbook.xlsm' -Stream Zone.Identifier, it's a manual removal of the MOTW stream, more control but riskier.
    • If you want to see if the file has an Internet zone mark, use Get-Item 'C:\Path\YourWorkbook.xlsm' -Stream Zone.Identifier

     

    However, if the issue persists, you have to reach out to your IT administrator. If your school enforces macro-blocking via Group Policy or Intune, these steps might not override the policy. In that case, IT must adjust settings or approve trusted locations. Your IT admin can give this article Macros from the internet are blocked by default in Office - Microsoft 365 Apps | Microsoft Learn a read to know what to do to allow VBA Macros to run in files in enterprise environment depends on your school's scenarios.

    User's image

    If the issue persists even after reviewing these policies, your IT team can collect diagnostic logs and raise the case to Microsoft Support for further troubleshooting. For further investigation and resolution, your IT administrator can create a support ticket from Microsoft 365 Admin Center > Support > Help & Support with their admin credentials.

    User's image

    Microsoft also provides customer service phone numbers based on your region. You can find the appropriate contact number here: Customer service phone numbers - Microsoft Support

     

    Note: We appreciate your understanding regarding the scope of support available through this forum. As moderators, our role is to provide general guidance and assist with common troubleshooting steps. While we do not have access to internal systems or administrative tools required to resolve account-specific or backend-related issues but we’ll continue doing our best to support you within the scope of our responsibilities.   I hope the information provided proves useful. Please proceed with the outlined steps and let me know whether they resolve the issue. If not, I’ll be glad to continue working with you to find a solution.

     

    Thank you for your patience and understanding throughout this process. Should you have any questions or need further assistance, feel free to reach out at any time.


    If the answer is helpful, click "Accept Answer" and vote positively. If you have more questions about this answer, click "Comment".

    Note: Follow the steps in our documentation to enable email notifications if you want to receive email notifications related to this topic.

    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.