My workbook has both chart sheets and normal sheets, therefore I am using Sheets
instead of Worksheets
. However, I don't know what the type of sht should be in the following set of codes. I am sure it cannot be Worksheet
.
' Hide all sheets/charts except Sheet1
Sub Hide_Sheets()
Dim sht As ???
For Each sht In ActiveWorkbook.Sheets
If sht.Name <> Sheet3.Name Then
sht.Visible = False
End If
Next sht
End Sub