Macros stopped working from buttons

helen5217

New Member
Joined
Aug 8, 2018
Messages
3
Hi, this is such a strange one I had to post a thread (not something I've done before, so forgive me if I make any errors).
All our users are on Office365 (installed locally, not the web version). Most users are on Win 10.
My boss has a macro-enabled template that is used by multiple staff. It's contains dozens of VBA macros, most of which are assigned to buttons (not form controls). It also contains links to an XML data source using powerquery. The users open the template and as part of the workflow a copy is saved out to a central storage for each job as an .xlsm file.
As of this morning, all users are getting an error message when they try to click any of the buttons (see below). It looks like there was a network drop this morning and one of the users had the template open at the time, leading to some kind of corruption (we think). The macros are all present and correct and still work if you run them individually, the data queries all work too. It is just anything linked to a button is throwing up this error.

The really perplexing issue is that if a user tries to open a previously saved file, they also get this error when they click on one of the buttons. I can understand that the template may have been corrupted or damaged in some way, but how could it affect literally hundreds of previously created files that were not open at the time of the network blip?
We have other macro-enabled templates that are used on similar workflows with macros assigned to buttons, they are still working as normal (thank goodness).

The template is being rebuilt using previous versions (stored elsewhere). I was just wondering if anyone else has experienced anything like this? Any insights into how this could happen and how it could be fixed without having to recreate the file from scratch would be greatly appreciated.
Many thanks
Helen

Macro Error 2021.11.12.jpg
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Goto to File, options, Trust Center, Trust Center Settings, Macro Settings. Do you have an option to "Enable Excel 4.0 macros"?
 
Upvote 0
Solution
No idea why though.
That makes two of us. I do not see why it would have that affect & it doesn't on some of my old files, but I have seen a number of people with the same problem since that option was added to the trust center.
 
Upvote 0
It really is perplexing, we have 2 other heavily used templates containing very similar macros, but they were unaffected. Weird.
Thank you again for your help, it saved us a lot of heartache.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top