VBA 2010: Help with checking a website for changes at a set frequency
Hello,
I'd like to automatically check a website once or twice a day to see if it has been updated with new information. Right now, I am polling the clock as a means to determine elapsed time. I'm told that this results in unnecessary use of the CPU and that I should look into a timer event. I'm unable to determine how to do this in Excel.
Here is the code that I'm using:
Code:
Public Sub MyTimer(timeinhours)
Dim N As Date
N = Now
Do While DateDiff("s", CDate(N), CDate(Now)) < timeinhours * 3600: DoEvents: Loop ' Note: return time from Datediff is in seconds.
End Sub
Re: VBA 2010: Help with checking a website for changes at a set frequency
look into application.ontime