Sub print_hidden_sheets()
Dim ws As Worksheet
Application.ScreenUpdating = False
On Error Resume Next
For Each ws In ThisWorkbook.Sheets
If ws.Visible = xlSheetHidden And ws.Name <> "Sheet2" And ws.Name <> "Sheet3" Then
ws.Visible = xlSheetVisible
ws.PrintOut
ws.Visible = xlSheetHidden
End If
Next
Application.ScreenUpdating = True
End Sub