Unhide all the Sheets

     

    Private Sub CommandButton1_Click()
    Dim i As Integer
    For i = 1 To Worksheets.Count
    Sheets(i).Visible = xlSheetVisible
    Next
    End Sub

     

     

    Hide & UnHide all the Sheets

     

    HIDE ALL SHEETS
    Private Sub CommandButton1_Click()
    Dim i As Integer
    For i = 1 To Worksheets.Count
    Sheets(i).Activate
    If ActiveSheet.Name = "pavan" Then
    ActiveSheet.Visible = xlSheetVisible
    Else
    ActiveSheet.Visible = xlSheetHidden
    End If
    Next
    End Sub
    UNHIDE ALL SHEETS
    Private Sub CommandButton2_Click()
    Dim i As Integer
    For i = 1 To Worksheets.Count
    Sheets(i).Visible = xlSheetVisible
    Next
    End Sub

     

    View all sheets - ForEach Loop

     

    Private Sub CommandButton1_Click()
    Dim sh As Worksheet
    For Each sh In ThisWorkbook.Worksheets
    sh.Visible = xlSheetVisible
    Next
    End Sub