ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pausing code execution (https://www.excelbanter.com/excel-programming/271228-pausing-code-execution.html)

Rohit Thomas

Pausing code execution
 
Hello All,

I would like to pause code execution for approx five secs
before running the next set of statements. Is this the
correct code to do that???

****some code here****
Application.Wait (Now + TimeValue("0:00:05"))
****some code here****

Thanks,
Rohit

John Wilson

Pausing code execution
 
Rohit,

You could try this:

Application.Wait Now + TimeSerial(0, 0, 5)

John

Rohit Thomas wrote:

Hello All,

I would like to pause code execution for approx five secs
before running the next set of statements. Is this the
correct code to do that???

****some code here****
Application.Wait (Now + TimeValue("0:00:05"))
****some code here****

Thanks,
Rohit




All times are GMT +1. The time now is 02:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com