Forms toolbar checkboxes

pfarmer

Well-known Member
Joined
Jul 6, 2005
Messages
550
I know I can do this with a controls toolbox checkbox, but is it possible to make a forms toolbox checkbox invisible?

I have a series of sheets in different workbooks that have forms toolbox checkboxes and it would be a lot easier to change a vba formula then changing the checkboxes themselves to a controls toolbox checkboxes to simply make them invisible depending on the status of another checkbox.

Perry
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Barry Katcher

Well-known Member
Joined
Feb 25, 2002
Messages
4,053
And, to take a page out of HalfAce's notebook, assign this code to a button and use the single button to toggle the checkboxes on and off:

Code:
Sub ToggleCheckboxes()
ActiveSheet.CheckBoxes().Visible = Not ActiveSheet.CheckBoxes().Visible
End Sub
 

pfarmer

Well-known Member
Joined
Jul 6, 2005
Messages
550
And, to take a page out of HalfAce's notebook, assign this code to a button and use the single button to toggle the checkboxes on and off:

Code:
Sub ToggleCheckboxes()
ActiveSheet.CheckBoxes().Visible = Not ActiveSheet.CheckBoxes().Visible
End Sub

Are you aware of a max number of checkboxes (forms toolbox)? What I am finding is I can apply the visible code to most of the check boxes but for some reason it will not work on three of them.

The only difference I can see is the checkbox number.

The three checkboxes are 253, 256, and 257. Not sure how they got numbered this high as it seems the next highest number is in the 60s.

I am starting to think that maybe this is the reason. I tried creating a new one on the same sheet (not a copy) and it was labeled 259 and the visible code will not work on it either.

Can the number be reset to the highest number + 1 of the ones in the more normal ranges?

Perry
 

Forum statistics

Threads
1,136,348
Messages
5,675,238
Members
419,555
Latest member
Paddington

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