Copied a Macro-Enabled Workbook into OneDrive, now macros cannot be run, edited, or deleted.

Copper Contributor

I have a Macro-Enabled Workbook that I've been using for over a year with no issues in using the macros inside. Yesterday I copied this workbook into my OneDrive folder.


Now, when I open the file from the local copy on my hard drive, I cannot run, edit, or delete any macros. I can record a new macro, but that macro has the same limitations as previously created macros, it cannot be run, edited, or deleted.


Trying to run a macro produces this error message:



That sounds like a lead, except that when I open the workbook I do not get a security banner at all, though the banner settings are enabled.



I have tried these settings in the Trust Center and they have not altered the behavior of macros.



I added the local hard drive location for OneDrive to Trusted Locations, including checking the box to include all subfolders, but this has not fixed the issue.



I should not have to use the un-secure macro security settings I posted above, but I would make do if they actually worked. As it is, I am stumped on how to fix this issue.


I would really love to be able to use OneDrive for my important documents, but most of my important Excel Workbooks have at least one macro in them, since I use them to save time on tasks that are repeated often.



Update 4/4/2022


I've done some more testing and it is definitely an issue related to the Trusted Locations in Office. I created a new folder and added that folder to Trusted Locations. I was able to use macros from files in that folder without any issues. Then I uninstalled and re-installed OneDrive and pointed it to that folder for its base location. After OneDrive took over the folder, macros no longer worked from files in that folder.


Basically, Office is not recognizing a OneDrive folder as a Trusted Location despite the folder being in the list.


If it helps, here are my Office and OneDrive versions:

Office - Version 2203 (Build 15028.20160 Click-to-Run) Current Channel

OneDrive - Version 2022 (Build 22.033.0213.0002)


Update 4/18/2022


I ran a test with Dropbox, since it's a similar service. I am able to get the local Dropbox folder recognized properly as a Trusted Location in Office and macros work fine once that's done. Which means it's not automatic just because an app is monitoring the folder for synchronization.


So, this seems to be purely a question of how to fix OneDrive to make it work correctly with Trusted Locations.

23 Replies



Spent ages trying all sorts of combinations - of internet settings and trusted location settings - that didn't work until I read this.

Why isn't this extra piece of vital info clear in Microsoft's own help pages about this?

The suggestion from @exeg to add the online Onedrive location name "" as a Trusted Location is spot on for people using Personal OneDrive. For people using a work or school account, your online OneDrive location will be different. To get the correct URL in that case, go to and open OneDrive. Copy the first part of the address, up through and add that to Trusted Locations (it will probably look something like, and check the box for "Subfolders of this location are also trusted" so that macros will work in any folder in your OneDrive.


This solution worked for me, took me awhile today to come to this page, the min that I added below location, I was able to use macro.

appreciate it