Can I print hidden Excel worksheets?

N

Ned C.

I've set up macros to print specific areas of hidden worksheets. I'd like to
be able to use the macro while keeping the sheets hidden.
 
R

Ray

Not sure if you can print sheets while they're hidden, but one
possible work-around would be to
set ScreenUpdating to False,
un-hide the sheet
print what you want
re-hide the sheet
set ScreenUpdating to True

Post your code for further assistance....

ray
 
J

JLatham

Actually, you don't even HAVE to turn screenupdating off - you'd be on some
other sheet when you performed the print of the sheet, and not even change
view for long - there might be a flicker as the sheet is unhidden, printed,
rehidden. But to prevent the flicker, turning it off is a nice touch.

Sub PrintMyHiddenSheet()
Application.ScreenUpdating = False
Sheets("myHiddenSheetName").Visible = xlSheetVisible
Sheets("myHiddenSheetName").PrintOut Copies:=1, Collate:=True
Sheets("myHiddenSheetName").Visible = xlSheetHidden
Application.ScreenUpdating = True
End Sub
 
Top