View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Flanagan Bob Flanagan is offline
external usenet poster
 
Posts: 340
Default Printing Multiple Worksheets

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

"TroyH" wrote in message
...
Why does this not work?

Private Sub PrnSheet_Click()
Dim Sht As Worksheet

For Each Sht In ActiveWorkbook.Worksheets
Sht.PrintOut
Next Sht
End Sub

I keep getting the error:

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