dantheman9
Board Regular
- Joined
- Feb 5, 2011
- Messages
- 175
hi im trying to automate a refresh process from excel for an ie9 browser.
but i get a client disconeected error when the code gets to the refresh command...relevent bits below;
but i get a client disconeected error when the code gets to the refresh command...relevent bits below;
Code:
Public Browser As Object
Sub start()
Dim WebPageDirectory As String
WebPageDirectory = Environ("appdata") & "\Race Creator\Temp.htm"
OpenBrowser WebPageDirectory
Timerun = Now() + TimeValue("00:00:20")
Application.OnTime Timerun, "refreash"
End Sub
Function OpenBrowser(tmpURL)
Set browser = CreateObject("InternetExplorer.Application")
If browser.Addressbar = True Then
browser.Addressbar = False
End If
If browser.StatusBar = True Then
browser.StatusBar = False
End If
If browser.Toolbar = True Then
Browser.Toolbar = False
End If
If browser.MenuBar = True Then
browser.MenuBar = False
End If
browser.Resizable = True
browser.Visible = True
browser.Navigate (tmpURL)
End Function
Sub refreash()
With Browser
.refresh
End With
End Sub