Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
wait
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
wait
"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 * |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
wait
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 * . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
wait
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 * . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wait statement in macro | Excel Discussion (Misc queries) | |||
(keys,wait) excel | Excel Discussion (Misc queries) | |||
sendkeys(keys,wait) how do I use wait | Excel Discussion (Misc queries) | |||
Should I Wait? | Excel Discussion (Misc queries) | |||
Problem with WAIT | Excel Programming |