Hi,
The following macro works, however I am trying to clean up the code
Sub ShowSet1()
Dim xWs As Worksheet
Dim xName As String
xName = "Sheet5"
For Each xWs In Application.ActiveWorkbook.Worksheets
If xWs.Name <> xName Then
xWs.Visible = xlSheetHidden
End If
Sheets("Sheet1").Visible = True
Sheets("Sheet123").Visible = True
Sheets("Sheet23").Visible = True
Next
End Sub
Thank you in advance,
Len
The following macro works, however I am trying to clean up the code
Sub ShowSet1()
Dim xWs As Worksheet
Dim xName As String
xName = "Sheet5"
For Each xWs In Application.ActiveWorkbook.Worksheets
If xWs.Name <> xName Then
xWs.Visible = xlSheetHidden
End If
Sheets("Sheet1").Visible = True
Sheets("Sheet123").Visible = True
Sheets("Sheet23").Visible = True
Next
End Sub
Thank you in advance,
Len