Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to unhide a multiple sheets trigger by a checkbox
I have a protected workbook with only one sheet visible and the rest of them
hidden. I want to use a check box in sheet1 as a trigger to unhide xyz sheets. If chesk box value is True the sheets will be unhide if value is False sheets should remain hidden |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to unhide a multiple sheets trigger by a checkbox
I inserted an activex checkbox and inserted the code in sheet1.
Private Sub CheckBox1_Change() On Error Resume Next ActiveWorkbook.Unprotect ActiveWorkbook.Worksheets("xyz").Visible = Me.CheckBox1.Value '????? ActiveWorkbook.Protect Structu=True, Windows:=False End Sub you need to modify this for the sheets you want to hide or run a loop as in for all the ones. dim i as long for i = 2 to worksheets.count step 1 ActiveWorkbook.Worksheets(i).Visible = Me.CheckBox1.Value next i -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "Duboa" wrote: I have a protected workbook with only one sheet visible and the rest of them hidden. I want to use a check box in sheet1 as a trigger to unhide xyz sheets. If chesk box value is True the sheets will be unhide if value is False sheets should remain hidden |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unhide Multiple Sheets | Excel Discussion (Misc queries) | |||
Unhide multiple sheets | Excel Discussion (Misc queries) | |||
Unhide multiple sheets all at once | Excel Discussion (Misc queries) | |||
How to unhide multiple sheets in one go | Excel Programming | |||
Can I unhide multiple sheets at once? | Excel Discussion (Misc queries) |