Printing Multiple Worksheets

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top