Hi All, i have this code, which seems like it should work, but its not... and its getting the best of me. I am trying to hide all worksheets except for a few in an array, if they are not allready hidden. here is what i have
Anyone know where im going wrong?
sd
Code:
Sub hidebut()
Dim ws As Worksheet, wb As Workbook
For Each ws In wb.Sheets
If ws.Name <> Sheets(Array("Dashboard", "MyStoreInfo")) Then
ws.Visible = False
Else
ws.Visible = True
Next
End Sub
Anyone know where im going wrong?
sd