Chrissirhc
Programmer
I'm trying to run a process every 5 minutes or so...
This code does this, however it uses the processor a lot. Doevents is taking up a lot of processor usage...
[lastrun].Value = Time
'infinite loop
While True
myDate = [lastrun].Value + 0.0035
Application.OnTime myDate, "LogInToSite"
While Time < myDate
Debug.Print DoEvents()
Wend
[lastrun].Value = myDate
Wend
Is there a way to do the same thing not hammering the processor. Having one excel sheet running using all processor power to do nothing doesn't seem ideal
Thanks,
Chris
This code does this, however it uses the processor a lot. Doevents is taking up a lot of processor usage...
[lastrun].Value = Time
'infinite loop
While True
myDate = [lastrun].Value + 0.0035
Application.OnTime myDate, "LogInToSite"
While Time < myDate
Debug.Print DoEvents()
Wend
[lastrun].Value = myDate
Wend
Is there a way to do the same thing not hammering the processor. Having one excel sheet running using all processor power to do nothing doesn't seem ideal
Thanks,
Chris