Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Printing Multiple Worksheets

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Multiple Worksheets jbwerner Excel Discussion (Misc queries) 3 April 10th 08 10:04 AM
duplex printing multiple worksheets Darlene Excel Discussion (Misc queries) 0 July 19th 06 02:33 PM
Printing multiple worksheets. old spice Excel Discussion (Misc queries) 1 June 14th 06 01:20 PM
Printing Multiple Worksheets Linda Excel Discussion (Misc queries) 1 August 8th 05 05:12 PM
Printing Multiple Ranges from Multiple Worksheets Dave Barkley[_2_] Excel Programming 1 July 22nd 03 06:10 PM


All times are GMT +1. The time now is 11:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"