Hello dear friends,
I've got several worksheet tabs in my workbook, I am currently selecting just 3 of them (out of 33 for example), I would like to hide all worksheets except the ones that I've selected (so it is vice-versa for hiding the selected ones).
this is the code below I am trying express for the desired result (of course not working at all), if any of you experts could direct me a little bit, it'd be highly appreciated:
Sub HidingUnSelectedSheets()
Dim ws As Worksheet
Sheets(Array("Sheet5", "Sheet6")).Select
For Each ws In ThisWorkbook.Windows(1).SelectedSheets
If Not ws Is Selected Then
ws.Visible = False
End If
Next
End Sub
Bookmarks