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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top