I want to hide all tabs whose names are "ABC", "DEF", "GHI"
This is my code:
Sub hideSheets()
Dim ws As Worksheet
invisible = Array("ABC", "DEF", "GHI")
For Each ws In ActiveWorkbook.Worksheets
For Each nome In invisible
If ws.Name = nome Then
ws.Visible = False
Else
ws.Visible = True
End If
Next nome
Next ws
End Sub
Which isn't hiding any sheet.