antaeusguy
Board Regular
- Joined
- Mar 8, 2010
- Messages
- 81
I have a number of worksheets in my workbook that changes everytime. It could have 10 worksheets one day and then 20 worksheets the other day. But which ever the condition is, I want to hide all worksheets except the first one Worksheets(1).
I know how to write a code that unhide all sheets, but I can't get to think how to skip the first one...
Any help is much appreciated!
I know how to write a code that unhide all sheets, but I can't get to think how to skip the first one...
Code:
Sub HideAllSheets()
Dim wk As Worksheet
Application.ScreenUpdating = False
For Each wk In Worksheets
wk.Visible = xlSheetHidden
Next wk
Application.ScreenUpdating = True
End Sub
Any help is much appreciated!