I have a workbook containing several sheets, some of which are hidden and some are not.
All I want to do is print out all of those that are visible, exept for the one named sheet (Input1)
I've managed to find a code from the Microsoft site but this only covers all the visible sheets.
Is there anyone who knows how to modify the code to exclude this one named sheet, or does it require a new code?
Thanks in advance.
All I want to do is print out all of those that are visible, exept for the one named sheet (Input1)
I've managed to find a code from the Microsoft site but this only covers all the visible sheets.
Is there anyone who knows how to modify the code to exclude this one named sheet, or does it require a new code?
Code:
Sub Print_Visible_Sheets()
Dim sht
' Turn off the screen redraw.
Application.ScreenUpdating = False
' Loop through for all sheets in the workbook.
For Each sht In Sheets
' If the current sheet is visible, then group it with the rest.
If sht.Visible Then sht.Select Replace:=False
Next
' Print all of the selected sheets.
ActiveWindow.SelectedSheets.PrintOut copies:=1
' Ungroup the sheets.
ActiveSheet.Select
' Turn back on the screen redraw.
Application.ScreenUpdating = True
End Sub
Thanks in advance.