Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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
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
Excel Printing Error Jeff New Users to Excel 4 February 19th 08 05:39 PM
printing error Teri Excel Discussion (Misc queries) 2 September 13th 05 02:29 AM
printing error debbie @ Boettcher Setting up and Configuration of Excel 1 April 8th 05 07:31 PM
Error on printing Graham Haughs[_3_] Excel Programming 1 September 27th 04 12:51 AM
Excel 97 printing error. tmphysique Excel Programming 0 August 3rd 04 05:29 AM


All times are GMT +1. The time now is 06:46 AM.

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"