Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Code to refresh web page until time of day

$
0
0

I'm not sure if this is the right place to post, but here goes, maybe someone will be able to answer.

I looked up some code to refresh a web page automatically and here is what I came up with and I'm using this to refresh a stock info page that requires a refresh at certain intervals to remain logged in:

On Error Resume Next
Set IE = CreateObject("InternetExplorer.Application")
With IE
  .Navigate ""--Add an appropriate web address
   .Visible = True
End With
counter = 1
Do Until counter>= 181
  WScript.Sleep 180000 '3 min
  IE.Refresh()
  counter = counter + 1
Loop

I'm in CST and this will refresh the page every 3 minutes for 540 minutes, the forum won't allow me to publish the web address, but the code work fine, I just want to use the PC time to stop the refresh until 1500 CST(or CDT).  I don't know the syntax to obtain or use the internal clock.

Any suggestions?



Viewing all articles
Browse latest Browse all 3527

Trending Articles