Delay execution

  • Thread starter Thread starter Anna Phelan
  • Start date Start date
A

Anna Phelan

Is there a command to temporarily halt execution in VBA,
like 'sleep' command in other languages?
I have automated batch document creation and printing but
the dicuments print too quickly causing the printer to get
confused. I thought I would make it sleep between documents
but I don't know how.
 
Anna,

You might want to try inserting a: DoEvents in the appropriate place in
your code to allow the operating system to process each print job. If
that does not work for your process, you might want to consider the code at
the following Access Web link:

Make code go to sleep
http://www.mvps.org/access/api/api0021.htm
 
Back
Top