Checklist to make worksheets visible

K

Kent McPherson

Is it possible to set up a checklist on a worksheet where each checked
item determines if a worksheet is visible or not? If I have worksheets
A, B, C, D, E, & F; I'd like the user to put a check mark in front of
whichever sheets he/she wants to see, e.g. A, D, & E. Any ideas?
 
P

pezyo

Kent,
One option would be to add sheet level check box controls to a
worksheet. The worksheet code would look something like this:

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Sheets("A").Visible = True
Else
Sheets("A").Visible = False
End If
End Sub
Private Sub CheckBox2_Click()
If CheckBox2.Value = True Then
Sheets("B").Visible = True
Else
Sheets("B").Visible = False
End If
End Sub
etc...

You would repeat the code for however many worksheets you wanted to be
able to toggle.
I hope that will work for you.

-pezyo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top