SendKeys problem

rustyg

life enthusiast
Local time
Today, 14:56
Joined
Jun 1, 2005
Messages
22
Heya,

Can anyone tell me how to pause the macro until a dialog box has been displayed before sending the {enter} command? (probably about 90 secs) I'm having troubles because it wont wait for the dialog box to come up. Help!


Russ
 
Searching the forum is a great way to discover and learn the answers to your Access programming questions.

You should avoid using SendKeys. If you insist [at your own risk], Search the forum for the Pause function I have posted.
 
You can try the Sleep function from this code:

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


Sleep 4000 ' this would pause the execution by 4 seconds
 
I have been using the sendkeys command quite alot over the last few projects I have worked on - why should I avoid using it and what are the alternatives.
 

Users who are viewing this thread

Back
Top Bottom