Kevin Billings
Kevin Billings

Reputation: 77

How to print preview a hidden sheet, keeping sheet hidden?

How can I convert this sub to print preview Sheet3, that's hidden, while keeping it hidden?

Sub PrintPreview()
Sheet3.PrintOut preview:=True

End Sub

Thank you in advance.

Upvotes: 1

Views: 1016

Answers (2)

Dy.Lee
Dy.Lee

Reputation: 7567

try,

Sub PrintPreview()
    With Sheet3
        .Visible = xlSheetVisible
        '.PrintPreview
        .PrintOut preview:=True
        .Visible = xlSheetVeryHidden
    End With

End Sub

Upvotes: 0

Kevin Billings
Kevin Billings

Reputation: 77

Sheet3.Visible = True
Sheet3.PrintOut preview:=True
Sheet3.Visible = False

@BigBen, thanks for the assist

Upvotes: 1

Related Questions