![]() |
Can I tell my Macro to stop running for 10sec?
Hi, Is there anyway to tell a macro to "Pause" when it gets to a certain stage for a set amount of time? After the set amount of time I need it to start again! Any ideas? Regards Garry -- Gazzr ------------------------------------------------------------------------ Gazzr's Profile: http://www.excelforum.com/member.php...o&userid=31075 View this thread: http://www.excelforum.com/showthread...hreadid=534402 |
Can I tell my Macro to stop running for 10sec?
Try this:
Sub waiting() Application.Wait (Now + TimeValue("0:00:10")) MsgBox "Hello" End Sub Or, you may also have a look at the OnTime method. Regards, Edwin Tam http://www.vonixx.com "Gazzr" wrote: Hi, Is there anyway to tell a macro to "Pause" when it gets to a certain stage for a set amount of time? After the set amount of time I need it to start again! Any ideas? Regards Garry -- Gazzr ------------------------------------------------------------------------ Gazzr's Profile: http://www.excelforum.com/member.php...o&userid=31075 View this thread: http://www.excelforum.com/showthread...hreadid=534402 |
Can I tell my Macro to stop running for 10sec?
from the vb help file
This example runs my_Procedure 15 seconds from now. Application.OnTime Now + TimeValue("00:00:15"), "my_Procedure" -- Gary "Gazzr" wrote in message ... Hi, Is there anyway to tell a macro to "Pause" when it gets to a certain stage for a set amount of time? After the set amount of time I need it to start again! Any ideas? Regards Garry -- Gazzr ------------------------------------------------------------------------ Gazzr's Profile: http://www.excelforum.com/member.php...o&userid=31075 View this thread: http://www.excelforum.com/showthread...hreadid=534402 |
Can I tell my Macro to stop running for 10sec?
They were both excellent answers. I'll make sure I check out "Help" next time! Thanks Garry -- Gazzr ------------------------------------------------------------------------ Gazzr's Profile: http://www.excelforum.com/member.php...o&userid=31075 View this thread: http://www.excelforum.com/showthread...hreadid=534402 |
All times are GMT +1. The time now is 01:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com