ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Checklist to make worksheets visible (https://www.excelbanter.com/excel-programming/335812-checklist-make-worksheets-visible.html)

Kent McPherson[_3_]

Checklist to make worksheets visible
 
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?

pezyo

Checklist to make worksheets visible
 
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



All times are GMT +1. The time now is 08:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com