Share via

Cannot unblock Excel macros

Anonymous
2023-11-13T16:31:31+00:00

I can't get Excel to allow my macros to run. (And I can't get screenshots to upload to this forum, so bear with me.)

For simplicity, I've created a new workbook with nothing but a single 3-line "hello world" macro in it. This workbook lives in a shared folder within my OneDrive. When I close it and re-open it, I get the red warning bar at the top:

"SECURITY RISK Microsoft has blocked macros from running because the source of this file is untrusted. [Learn More]"

So to be clear, I can't even reopen the macro I just wrote.

How can the source be untrusted? I created the file myself!

I've tried all the steps in the help file:

  • The file properties dialog does not have a "Security" section at the bottom, so there's no "Unblock" checkbox I can tick
  • I've gone into Excel > File > Options > Trust Center > Trust Center Settings, and done the following:
    • Trusted locations: Added "C:\Users\Owner\OneDrive\blah blah" (the shared folder where the file lives)
    • Trusted documents: Checked the box next to "Allow documents on a network to be trusted"
    • ActiveX settings: "Enable all..." (potentially dangerous; I look forward to unchecking this once I've resolved the issue)
    • Macro settings: "Enable all..." (potentially dangerous; I look forward to unchecking this once I've resolved the issue)
    • Macro settings: Checked the box next to "Trust access to the VBA project object model"

The ONLY thing I have found that works is moving the file up 1 level, out of the shared folder, into the root of my OneDrive. But that's not a viable solution for me, since the macros I'm writing are for our whole team to use.

What else can I try?

Microsoft 365 and Office | Excel | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-11-13T17:56:32+00:00

    Hello,

    Thank you for coming to the forum. My name is Fuad.

    It is worth noting that this is a user community, and we are all users here, much like yourself. While we strive to assist and share insights, we are not Microsoft directly.

    I am very sorry about this, but the problem is where the file is located.

    As you have tried, so have I and many in this forum, to find a way around this, but Microsoft has blocked Macros from running from internet folders, of which OneDrive is one.

    There is no way around this, if you copy this file to your desktop for a test you will see that it works with no issues, but as long as the file is in the internet folder, it will not work.

    here is a link on the above https://learn.microsoft.com/deployoffice/security/internet-macros-blocked

    If there is anything else on this subject you have a question on, do let me know.

    Best Regards Fuad

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments