VBasic - command buttons stopped working

RogerThePerson

New Member
Joined
Jun 13, 2013
Messages
13
I have a Mastermind game sheet that uses many command buttons. After several YEARS(!), it suddenly stopped working.
I'm using Excel 2010 at the office but the workbook is saved as Excel 97-2003 for compatibility with my home PC (this has worked fine for years).
The buttons are all enabled and are seen to respond, but none of them work - the code just doesn't run.
I have tried disabling subroutines one at a time, by converting each line to a comment.
I tried adding a new command button to do a simple task but the new button also fails to do anything.

Any ideas?
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,796
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Are they activeX buttons or Form buttons?
 

RogerThePerson

New Member
Joined
Jun 13, 2013
Messages
13
I've looked through all the 'File > Options > Trust Center' settings and can't find anything that's turned off but looks like it should be on (or vice versa).
 

RogerThePerson

New Member
Joined
Jun 13, 2013
Messages
13
Are they activeX buttons or Form buttons?
I've read about ActiveX but I'm afraid I was brought up on Spectrum Basic and assembler and don't really understand what it actually means (doh!).
In case this helps you:

I always start off writing code by firstly using the 'Command Button (ActiveX Control)' button to create each command button on the sheet.
In Design mode, I then right-click and select 'View Code' to get:

Private Sub CommandButton1_Click()

End Sub

This method has always worked well for me.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,796
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS

RogerThePerson

New Member
Joined
Jun 13, 2013
Messages
13
There's your answer. ;)
Can you try using a form button and assigning a macro to it instead? If that works, I suspect you're running into yet another activeX update issue. (See here for example: Office Update breaks ActiveX controls | Excel Matters)
Good suggestion - thanks - but I remember this ActiveX bug arising a long while back. Our IT dept circulated the fix instructions (removal of *.exd files) and all was well. This problem is new, and affects only THIS workbook.
Maybe the problem is much simpler - maybe there is another setting that I've overlooked which disables macros ONLY in this workbook?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,796
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Macro security settings are application wide, but it is possible you disabled macros for that workbook when you opened it. Can you run any of the code manually from the VB Editor?
 

Watch MrExcel Video

Forum statistics

Threads
1,095,546
Messages
5,445,116
Members
405,317
Latest member
gcallaway

This Week's Hot Topics

Top