Using Timer

  • Thread starter Thread starter Ian Millward
  • Start date Start date
I

Ian Millward

I'm working in Access 2k and manipulating data in Excel 2k using VBA but the
code trips up waiting for my queries to execute. I would like to pause the
flow but I can't get the hang of the timer. It looks simple enough but the
documentation is a bit lean.

What would be a simple line to pause the execution of code for, say, 5
seconds.?

Ian Millward
Edinburgh
 
Hi Ian

If Application.Wait(Now + TimeValue("0:00:5")) Then
MsgBox "Have waited 5 seconds"
End If
 
Frank,

<< If Application.Wait(Now + TimeValue("0:00:5")) Then
MsgBox "Have waited 5 seconds"
End If>>

That works a treat.


Many thanks,

Ian Millward
 

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