VBA – Print Only Hidden Worksheets

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

Sub PrintOnlyHiddenWorksheets()
Dim CurVis As Long
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Worksheets
With sh
CurVis = .Visible
If CurVis >= 0 Then
.Visible = xlSheetVisible
.PrintOut
.Visible = CurVis
End If
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