Issues Enabling Macros in a Shared Excel Workbook on OneDrive

Copper Contributor

Hello everyone,

I have designed an Excel workbook on my computer that contains VBA macros. This workbook is stored in a shared folder on OneDrive and is accessed daily by multiple collaborators from different locations. However, we are facing a persistent issue: the macros are always disabled for security reasons, and we have not been able to find a way to enable them.

What We've Already Tried:

  1. Enabling all macros in Excel's macro settings on each machine.
  2. Right-clicking on the file, going to properties, and looking for the option to unblock under the general security tab (the option doesn't appear).
  3. Adding the URL generated by OneDrive to trusted sites in Internet options.
  4. Creating a self-signed certificate to sign the VBA code (the certificate does not appear in the list of available certificates in the VBA Editor).
  5. Exporting and importing the certificate into the "Personal" store.

None of these solutions have worked, and we are at a standstill. Has anyone faced a similar issue or have any idea how to solve this? Any help would be greatly appreciated.

I have attached a sample file that illustrates the basic structure of the workbook and the macros involved.

https://1drv.ms/f/s!AmLVPVXR54kKhYkFP1HamI0I7NDWUQ?e=sWfPFr 

3 Replies

@FDOandrade Have you tried adding the onedrive folder as a trusted folder in Excel's trust center?

@FDOandrade I have been using the same layout (excels with VBA and data import in shared folder with collaborators) for several years now, without any macro blocking or security risk message. But recently, I shared the folder with other users with new office 365 installations. I am having the exact same problems as you, but only with the new computers. The old ones are working as always, even when they run the updated by subscription office 365. In the new computers, if I copy the file to a trusted local folder, it runs fine, but if I return or save the file in the onedrive shared folder the problem returns. It seems to me that the problem is that excel do not recognize onedrive folders as trusted ones on new installation. The most confusing thing is that the old computers run those files just fine, and they have not inherited the security policies with the office or onedrive update. I hope this mentioned here give us light to point into the right direction to a solution.

@FDOandrade I figured out a work around to the problem. The old one drive app has an option to disable office apps collaboration. To stop excel from using onedrive paths instead of local paths you had to turn it off. In the new onedrive app, that option disappeared. Try this. Go to your onedrive app icon, and (left click) go to pause synchronization and exit onedrive. Then go to your excel file and open it. If the problem is gone, go to onedrive app settings and turn off the "disable Office Apps collaboration" option. If that option does not appear in your onedrive app, then uninstall onedrive, install an older version, disable the office collaboration option, and update onedrive. The problem should disappear... I hope this helps