The timer interval cannot be set to such a high value, so you'll need some help. Also, the timer is not accurate as to the number of milliseconds. The timer will be checked in intervals of 55 milliseconds under win98, and every 10 ms for winnt. So I suggest you use the system time to verify the hour you need. In the form load, set the interval to 1000 or 1100 milliseconds. Then use this code in the timer event.
Code:private sub timer1_timer()
static start as date
if (cdbl(start)=0)then
start=now 'Initialize...This represents a loss of .Interval ms in accuracy
exit sub
endif
if ((cdbl(now)-cdbl(start))*24>=1) then
retval=shell.....
start=now() 'Reset the starting point
endif
The above should work ok.
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).