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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Stop my timer 4
Self Closing MsgBox 6
Make code aware of the workbook file name 3
Save and exit automatically 2
timer issue 5
Visible countdown timer 5
Making macros Wait 3
Start when open file 6

Back
Top