Hello All,
I got this macro from this forum and it is working alright except for one little issue. When I run it, it hides all sheets (as it should) except for "Master" (again as it should), but it also leaves one last sheet visible. Why is that?
I got this macro from this forum and it is working alright except for one little issue. When I run it, it hides all sheets (as it should) except for "Master" (again as it should), but it also leaves one last sheet visible. Why is that?
Code:
Sub HideMultiSheets()
Dim myRange As Range
Dim cell As Range
Set myRange = Sheets("Master").Range("A2:A60")
On Error Resume Next
For Each cell In myRange
If cell.Value <> "" Then
Sheets(cell.Value).Visible = False
End If
Next cell
Sheets("Master").Visible = True
On Error GoTo 0
End Sub