J
Jake
Hello,
I would like to hide all sheets in a workbook except a sheet with Code Name
wksAdmin. The following code produces error message: object does not
support this property or method. I know i'm referencing wksAdmin
incorrectly, but not sure why. thanks for any help.
Sub HideAllSheetsExceptAdmin()
Dim wksSheet As Worksheet
For Each wksSheet In ActiveWorkbook.Worksheets
If wksSheet <> wksAdmin Then
wksSheet.Visible = False
End If
Next wksSheet
End Sub
I would like to hide all sheets in a workbook except a sheet with Code Name
wksAdmin. The following code produces error message: object does not
support this property or method. I know i'm referencing wksAdmin
incorrectly, but not sure why. thanks for any help.
Sub HideAllSheetsExceptAdmin()
Dim wksSheet As Worksheet
For Each wksSheet In ActiveWorkbook.Worksheets
If wksSheet <> wksAdmin Then
wksSheet.Visible = False
End If
Next wksSheet
End Sub