VBA – Print Visible and Hidden Worksheets

The solution for “VBA – Print Visible and Hidden Worksheets” can be found here. The following code will assist you in solving the problem.

Sub PrintHiddenAndVisibleWorksheets()
Dim CurVis As Long
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Worksheets
With sh
CurVis = .Visible
.Visible = xlSheetVisible
.PrintOut
.Visible = CurVis
End With
Next sh
End Sub

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts