Answers for "VBA - Print Only Hidden Worksheets"

VBA
0

VBA - Print Only Hidden Worksheets

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
Posted by: Guest on April-22-2022

Code answers related to "VBA"

Browse Popular Code Answers by Language