Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error from printing to fast
I am using the following command to print worksheets in a loop: Worksheets(wsname).printout When I step thru my code it works fine but when I run it at full speed it causes Excel to crash. Is there an alternative to this statement that requires no user response but waits for the print to happen before the code continues? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error from printing to fast
You could try using a delay to let the communication between the CPU and the
Printer take place to download the print file for each print job. Usually the problem is either the printer does not have sufficient memomory or the buffers are not dumping fast enough and VBA decides it cannot do the job. Here is a snippet that will delay for 1 second. If you put this immediiately after your print command it might do the trick. You can increase or decrease the time by changing the number after the plus sign. It will go as low as .1 seconds. s = Timer + 1 Do While Timer < s DoEvents Loop "gtslabs" wrote: I am using the following command to print worksheets in a loop: Worksheets(wsname).printout When I step thru my code it works fine but when I run it at full speed it causes Excel to crash. Is there an alternative to this statement that requires no user response but waits for the print to happen before the code continues? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Printing Error | New Users to Excel | |||
printing error | Excel Discussion (Misc queries) | |||
printing error | Setting up and Configuration of Excel | |||
Error on printing | Excel Programming | |||
Excel 97 printing error. | Excel Programming |