View Full Version : SendKeys problem


rustyg
01-23-2006, 07:39 PM
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

ghudson
01-24-2006, 05:14 PM
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 (http://www.access-programmers.co.uk/forums/search.php) the forum for the Pause function I have posted.

MStCyr
02-01-2006, 11:34 AM
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

Johnvandamme
03-01-2006, 06:59 AM
or create a form with a timer event..

JohnN2006
03-20-2006, 06:50 AM
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.