Enable/activate toggle button with a macro

RPM7

Board Regular
Joined
Nov 28, 2007
Messages
191
I'm trying to create a macro to reset the information in my worksheet to its original settings/ cell values however I have two toggle buttons in the worksheet.

I thought I could just insert:

If ToggleButton1.Value = False Then
ToggleButton1.Value = True
End if

As you can see from my post, this obviously didn't work.
I've looked online but can't see this referenced anywhere.
Can anyone help? Thanks.
 
Hi, Why don't you use your coe to just disable the toggle buttons when you run the code. i.e. ".enabled = False", and have another code, perhaps when you open the sheet to "enable" them.
To my mind there are two ways to disable them , either by the ". enable" Method or to have some criteria at the start of the code that will run the code if met and not, if Not met.
As long as they don't work when you don't want them to, thats all that matters.
Regards Mick
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi Mick,

I suppose its just a silly little feature to have reset.
The spreadsheet (Calculator) could be in use all day. Plus its setup as a read only. For every new calculation we'd reset it back to the default values as that's whats used most of the time plus it means we don't have to check off the different items for a new calculation.

I'll leave it as it is. If they are enabled then, the fact they're highlighted red should get the user's attention. Thanks for all your help & sorry for putting ya to all the hassle.
 
Upvote 0

Forum statistics

Threads
1,215,263
Messages
6,123,957
Members
449,135
Latest member
jcschafer209

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