Better would be to set the Backgroundquery property to false and the macro
will wait for the query to finish.
--
Regards,
Tom Ogilvy
wrote in message
...
Thanks , that is just what I needed
-----Original Message-----
"Eddie" wrote in
message
...
Does anyone know what the syntex is to force a 10
second
wait in a macro ? I am doing a odbc call in excel and
want to give the query a chance to complete before
starting the next one. Thanks
Hi Eddie,
Here's the general idea:
Sub UseWait()
MsgBox "Start"
Application.Wait Now() + CDate("00:00:10")
MsgBox "End"
End Sub
Wait restarts at a specifically defined time, so you
have to add the number
of seconds you want to wait to the current time. Change
the argument to
CDate() to modify how long the wait should be.
--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/
* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
.