PDA

View Full Version : Solved: Do something every 14 minutes



remy988
10-15-2012, 06:55 AM
hi,

how do i insert a code to run every 14 minutes within a For/Next statement?

for i = 1 to 30000
'do something
'if 14 minutes have passed, then do something else and then continue
next i


thanks
rem

GarysStudent
10-15-2012, 07:03 AM
See:

http://www.cpearson.com/Excel/OnTime.aspx

SBrooky
10-15-2012, 08:42 AM
For i = 1 to 30000
'do something
Application.Wait (Now + TimeValue("0:14:00"))
'do something else
next i

Is this what you mean?

remy988
10-15-2012, 08:54 AM
GarysStudent
thanks, i'll take a look


rem