how to set an interval
hi,
i want to put an interval into a loop how to do it for example for each k in ks msgbox k.name interval(say,10 senconds) next thanks |
how to set an interval
Hello, Here's how... For Each k In ks MsgBox k.name 'Pause 10 seconds Application.Wait(Now + TimeValue("0:00:10")) Next k Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=508818 |
how to set an interval
Hello, Here's how... For Each k In ks MsgBox k.name 'Pause 10 seconds Application.Wait(Now + TimeValue("0:00:10")) Next k Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=508818 |
how to set an interval
Wait will work but will suspend all other operations. In case you wan do " some thing else " while your timer is also running, use OnTim method. It is like setting an alarm. You set OnTime for 10 secs t execute your procedure and do whatever else you want to do. At exactl at the set time your proc will execute. At the end of your proc yo could set another OnTime for 10 secs and you are free to do somethin else instead of waiting for loop to count 10 seconds. A V Veerka -- avveerka ----------------------------------------------------------------------- avveerkar's Profile: http://www.excelforum.com/member.php...fo&userid=3033 View this thread: http://www.excelforum.com/showthread.php?threadid=50881 |
how to set an interval
Thanks a lot.
Thanks to all. "Leith Ross" wrote in message ... Hello, Here's how... For Each k In ks MsgBox k.name 'Pause 10 seconds Application.Wait(Now + TimeValue("0:00:10")) Next k Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=508818 |
All times are GMT +1. The time now is 12:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com