SOLVED

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:

ChristopherLandry_4-1649261664200.png

 

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.

ChristopherLandry_3-1649261477925.png

 

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

ChristopherLandry_0-1649261356431.png

 

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.

ChristopherLandry_1-1649261415458.pngChristopherLandry_2-1649261440982.png

 

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

@exeg 

Excellent.

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 "https://d.docs.live.net/" 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 https://www.office.com/apps?auth=2 and open OneDrive. Copy the first part of the address, up through .sharepoint.com and add that to Trusted Locations (it will probably look something like https://yourcompany-my.sharepoint.com), and check the box for "Subfolders of this location are also trusted" so that macros will work in any folder in your OneDrive.

@exeg 

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