How can I toggle sheet tabs on/off using a Check Box?

VH5150

Board Regular
Joined
Mar 1, 2004
Messages
60
I am trying to toggle my sheet tabs on and off using a check box from the forms toolbar. How do I do this?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Mudface

MrExcel MVP
Joined
Feb 18, 2002
Messages
3,339
Try using one from the Control Toolbox, then you can use it's click event as follows-

Code:
Private Sub CheckBox1_Click()

ActiveWindow.DisplayWorkbookTabs = CheckBox1

End Sub

Change CheckBox1 to match the name of your checkbox if necessary.
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,270
If you are set on the Forms toolbar for your checkbox, then right-click it, left click on Assign Macro, and assign it this one, which goes in a standard module:

Sub Test1()
With ActiveWindow
.DisplayWorkbookTabs = Not .DisplayWorkbookTabs
End With
End Sub
 
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,152,101
Messages
5,768,101
Members
425,453
Latest member
bince

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