Printing Multiple Worksheets

T

TroyH

Why does this not work

Private Sub PrnSheet_Click(
Dim Sht As Workshee

For Each Sht In ActiveWorkbook.Worksheet
Sht.PrintOu
Next Sh
End Su

I keep getting the error

Run-time error '1004'
Method 'PrintOut' of object '_Worksheet' failed
 
B

Bob Flanagan

Is one of the sheets empty? You can determine which sheet it is by setting
a watch on Sht.Name.

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 
Top