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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
73,043
Office Version
  1. 365
Platform
  1. Windows
Goto to File, options, Trust Center, Trust Center Settings, Macro Settings. Do you have an option to "Enable Excel 4.0 macros"?
 
Solution

helen5217

New Member
Joined
Aug 8, 2018
Messages
3
Thank you! I have enabled it and it seems to have fixed the problem. No idea why though.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
73,043
Office Version
  1. 365
Platform
  1. Windows
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.
 

helen5217

New Member
Joined
Aug 8, 2018
Messages
3
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.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
73,043
Office Version
  1. 365
Platform
  1. Windows
Glad to help & thanks for the feedback.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,602
Messages
5,832,664
Members
430,153
Latest member
Javid_P

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
Top