View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
ISS6 ISS6 is offline
external usenet poster
 
Posts: 7
Default Print Performance in VBA

I believe it is indeed Sheet2.printout. I'm typing from memory!

This is a stand-alone system - a P4 PC with an attached printer. No
network. In this particular configuration, it is printing to an HP LaserJet
1400 that has a 8 meg buffer. The entire application is less than 1 meg!

While the PrintOut command is executing, the screen locks up - that is, the
hourglass replaces the cursor and nothing else can happen in the application
until it finishes. Naturally, I can go to another application - Word,
Solitaire - while waiting for Excel to execute the print, but I can't
understand why this bogs down so heavily. After all, the sheet has been
completely formatted and all I'm doing is sending it to the printer!


"JLGWhiz" wrote:

I just noticed your syntax, Sheet2.Print.

This is not the normal syntax for printing sheets. I would use:

Sheet2.PrintOut

"ISS6" wrote:

I have developed an EXCEL 2003 VBA application that works like a charm -
except for printing various reports.

The user selects a report to be produced and it is built to a new sheet.
Watching the process, I can see that this happens very quickly.

However, once the command Sheet2.Print is executed, processing drops to a
crawl. It takes up to a full minute to get the sheet sent to the printer.
What's going on? I can perform the same function from the spreadsheet in a
blink of an eye, but within VBA, it takes forever.

Am I forgetting to set something?