Using the code below where I'm able to select all sheets that contains the word "ba" on it however, if those sheets/tabs are hidden, I can't, I get a "Run-time errror '1004':" warning.
Any suggestion how could I make this code work with hidden sheet/tabs? So it shows all sheets/tabs names with "ba" even if it's hidden shows up? If they are hidden, I want them to appear or .Visible = True
Sub listray()
Dim ws As Worksheet, flg As Boolean
For Each ws In Sheets
If LCase(ws.Name) Like "*ba*" Then
ws.Select Not flg
flg = True
End If
Next
End Sub
End Sub
Selectthe sheet?Selecta sheet to hide/unhide it.