Hi, Not a Vb programmer, trying to get the following working is
proving difficult.
Esentially at the moment the script opens IE on a page and refreshes
periodically, I need it to close the browser at a certain time, if
doesn't seem to do anything with the If mytime = xx.xx then statement
in the while loop. i'm probably doing something glaringly wrong.
I've had a good google but can't find anything... help?
Thanks
DIM mytime
mytime = FormatDateTime(Time(), vbShortTime)
On Error Resume Next
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "www.bbc.co.uk"
Wscript.Sleep 5000
Set objDoc = objExplorer.Document
Do While True
Wscript.Sleep 5000
objDoc.Location.Reload(True)
If Err <> 0 Then
Wscript.Quit
End If
If mytime = "09:49" Then
objExplorer.quit
End If
Loop