R
Rob
Excel 2000
I'm using the following code to cycle through a workbook and where a sheet
has been hidden it's property is changed to visible. However, I'm manually
setting the hidden sheets to very hidden in the VBA browser and need to
toggle back to very hidden using code. Unfortunately, the following changes
from very hidden to visible but then only sets hidden if the sheet was
visible i.e. after running this code a user can unhide the sheets by a
choice from Format: Unhide menu.
I have tried all combinations of xlsheetveryhidden etc. but to no avail -
any ideas?
Thanks Rob
For Each sh In ActiveWorkbook.Worksheets
With sh
If .Name <> "MENU" Then _
.Visible = Not (.Visible = True)
End With
Next sh
I'm using the following code to cycle through a workbook and where a sheet
has been hidden it's property is changed to visible. However, I'm manually
setting the hidden sheets to very hidden in the VBA browser and need to
toggle back to very hidden using code. Unfortunately, the following changes
from very hidden to visible but then only sets hidden if the sheet was
visible i.e. after running this code a user can unhide the sheets by a
choice from Format: Unhide menu.
I have tried all combinations of xlsheetveryhidden etc. but to no avail -
any ideas?
Thanks Rob
For Each sh In ActiveWorkbook.Worksheets
With sh
If .Name <> "MENU" Then _
.Visible = Not (.Visible = True)
End With
Next sh