Excel VBA - Using checkboxes to hide/unhide worksheets

Shelby21

New Member
Joined
Nov 21, 2017
Messages
29
Hi guys,

I need some help with a spreadhseet I have been working on for months.
I'm not very good with VBA and don't think there is any other way to accomplish what I am trying to do below.

Any help would be much appreciated!

This spreadsheet has the following tabs:

DC_Info
Instructions
LP
IR_Setup
PASS
CR_Setup
IR_Teaching
CR_Teaching
Robot_Teaching_Verifications
Wafer_Slip_DCP's
KMTerm_Commands
SU3200_Shims
Revision_History

What I am trying to do:

The table below is located in the Instructions tab.

I would like to link each checkbox to its corresponding worksheet

Checking the box makes the worksheet visible

Unchecking the box hides the worksheet

I would also like to be able to center the checkboxes within column E and have solid border for the checkbox instead of just the two line bordered checkboxes shown below

If possible, a last item would be to highlight cell of the worksheet name yellow if the checkbox is checked.

setup.PNG
 

Shelby21

New Member
Joined
Nov 21, 2017
Messages
29
Hi Saura,

Thank you for your response on how to resolve the issue during worksheet protection.
I tried your method, but this isn't going to work for what I need.
Using that method unlocks the worksheet that is selected allowing the end user to view and modify formulas and cells, which I do not want.

The work around I came up with is to run a worksheet macro I put in that will protect all worksheets by pressing Ctrl + Shift + P
Once all worksheets are protected, I unprotect the Instructions tab that contains the checkboxes for all the other tabs.
Press protect worksheet and check the box for format cells, which is only applied to the Instructions tab.

Viola!

Everything is protected the way I want and the tab checkboxes are working as intended.
 

Excel Facts

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

Forum statistics

Threads
1,136,290
Messages
5,674,893
Members
419,532
Latest member
longphamtel

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