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

The report is formatted to Sheet very quickly. However, the actual command
PrintOut is extremely slow in executing. It just sits there on this line for
up to a minute, do what I have no idea. Maybe waiting for the printer to
power up? (The printer is on all the time, but I think it goes into a
standby mode to conserve energy) Whatever happened to the Windows print
spooler? I thought that the spooler was an automatic part of Windows, but
maybe I need to manage it programatically?

If I'm just waiting for the printer to that is the case, can the printer be
"poked" to wake it up when the Reports Menu is entered - say in the
UserForm_Activate module - without anything actually being printed?

Oh, what a tangled web.......


"JLGWhiz" wrote:

Just guessing, but it sounds like a communication problem with the printer.
Maybe the printer driver. But you said that manually it zips right out, so
probably not the driver. I am not really a techie, so I don't know what the
difference between a VBA print command and a click event command amount to.
I would think, very little. I do not think it is VBA per se that is the
problem.

"ISS6" wrote:

Aye, it finishes, just slower than molasses.

The code is:

Sheet2.PrintOut

That's it. The sheet is built from data selected rom Sheet1. This happens
very quickly (I stepped through the code to isolate the problem). I can
Print Preview the report and it's perfect. Then I step onto Sheet2.PrintOut
and wait up to a minute. The report is printed and then control returns to
the menu.


"JRForm" wrote:

ISS6,

Does it ever finish? Perhaps you could post the code you are using to get
your 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?