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?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Are they activeX buttons or Form buttons?
 
Upvote 0
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).
 
Upvote 0
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.
 
Upvote 0
Upvote 0
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?
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,212,927
Messages
6,110,693
Members
448,293
Latest member
jin kazuya

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