dantheman9
Board Regular
- Joined
- Feb 5, 2011
- Messages
- 175
so i still can't find any information about this anywhere.
I have a vba addin that was make in excel 2007 on xp, everything there works fine.
however on win7 it seems not to work (a public variable is not maitained) and so the code breaks.
the code issues are around starting and refreshing an instance of internet explorer, i have tried it with both ie8 and ie9, to the same results and error.
the code that is the problem is as follows;
the code is started from a call to watchon from another module, and returns to that point after running through the function to start internet explorer.
setting a watcher on Browser Object, it seems ok up untill the function has ended, then it gets reset to null value...so when the refresh runs it has no track to the Browser in question.
Anyone some ideas on this?
I have a vba addin that was make in excel 2007 on xp, everything there works fine.
however on win7 it seems not to work (a public variable is not maitained) and so the code breaks.
the code issues are around starting and refreshing an instance of internet explorer, i have tried it with both ie8 and ie9, to the same results and error.
the code that is the problem is as follows;
Code:
Public Browser As Object
Sub detectedfile()
With Browser
.refresh ' error here (runtime error) client connection lost?
End With
End Sub
Public Sub Watchon()
' Active via starting result watch
Dim WebPageDirectory As String
Dim ppt As Object
State = "Mointoring Folder..."
If Userform1.htmloption = True Then
If Dir(Environ("appdata") & "\Race Creator\Temp.htm") = "" Then
WebPageDirectory = Environ("appdata") & "\Race Creator\Temp.htm"
Else
WebPageDirectory = Environ("appdata") & "\Race Creator\Temp.htm"
End If
OpenBrowser WebPageDirectory
End Sub()
Function OpenBrowser(tmpURL)
Set Browser = CreateObject("InternetExplorer.Application")
Browser.Navigate (tmpURL)
Browser.Addressbar = False
Browser.StatusBar = False
Browser.Toolbar = False
Browser.MenuBar = False
Browser.Resizable = True
Browser.Visible = True
End Function
the code is started from a call to watchon from another module, and returns to that point after running through the function to start internet explorer.
setting a watcher on Browser Object, it seems ok up untill the function has ended, then it gets reset to null value...so when the refresh runs it has no track to the Browser in question.
Anyone some ideas on this?