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
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
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
Wait will work but will suspend all other operations. In case you want do " some thing else " while your timer is also running, use OnTime method. It is like setting an alarm. You set OnTime for 10 secs to execute your procedure and do whatever else you want to do. At exactly at the set time your proc will execute. At the end of your proc you could set another OnTime for 10 secs and you are free to do something else instead of waiting for loop to count 10 seconds.
A V Veerkar
Thanks a lot.
Thanks to$B!!(Ball.
"Leith Ross" <Leith.Ross.22stb0_1139213705.338@excelforum-nospam.com> wrote
in message news:Leith.Ross.22stb0_1139213705.338@excelforum-nospam.com...
>
> 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
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks