Timer control

  • Thread starter Thread starter Mark Scholes
  • Start date Start date
M

Mark Scholes

Hi,
I want to have a graph up dated ever 5 minute. I use this
macro
Sub Time_Control()

Begin:
' Start time
Time1 = Timer
' Wait 5 Minutes
Do While (Time1 + (5 * 60)) > Timer
Loop
' Call macro
Call Update
' Stop after 1600 Hours
If (1600 * 60) > Timer Then GoTo Begin

End Sub

it has two problems, you can't look at the graph while it
is running and it takes a lot of processor power to just
sit there ansd wait.

Thanks MarkS
 
Mark,

Take a look at the OnTime method in VBA Help. This will allow you to forward
schedule a macro to run at 5 minute intervals, which can do the graph
update. It won't be as heavy, and will release the machine.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top