ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pause code in vb (https://www.excelbanter.com/excel-programming/360988-pause-code-vbulletin.html)

Greg[_27_]

Pause code in vb
 
Hi all,

How do I get a macro to pause for 5 seconds and then continue with the rest
of the code?

Thanks

Greg



Ardus Petus

Pause code in vb
 
application.Wait now+timevalue("0:0:5")

HTH
--
AP

"Greg" a écrit dans le message de news:
...
Hi all,

How do I get a macro to pause for 5 seconds and then continue with the
rest of the code?

Thanks

Greg




Greg[_27_]

Pause code in vb
 
I worked it out thanks anyway

Greg
"Greg" wrote in message
...
Hi all,

How do I get a macro to pause for 5 seconds and then continue with the
rest of the code?

Thanks

Greg




Chip Pearson

Pause code in vb
 
Greg,

Try

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



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Greg" wrote in message
...
Hi all,

How do I get a macro to pause for 5 seconds and then continue
with the rest of the code?

Thanks

Greg




Greg[_27_]

Pause code in vb
 
Thanks I decided to try google and found the answer exactly what you wrote
Thanks to both of you for your answers

Greg
"Chip Pearson" wrote in message
...
Greg,

Try

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



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Greg" wrote in message
...
Hi all,

How do I get a macro to pause for 5 seconds and then continue with the
rest of the code?

Thanks

Greg







All times are GMT +1. The time now is 04:58 AM.

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