Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping track of IE Windows

Status
Not open for further replies.

uprichard

Programmer
May 2, 2002
16
I create an IE browser window using the following:

Dim oIE As Object
Set oIE = CreateObject("InternetExplorer.Application")
If oIE Is Nothing Then
LogEntry "Could not invoke Internet Explorer Object"
Exit Function
End If
oIE.Visible = True
Set GetBrowser = oIE
Set oIE = Nothing

I can now drive the application. But the problem is that sometimes the application will close this browser window and open a new one.

Question: How can I reset the object "GetBrowser" to point to the new IE window?

Thanks,
 
Have a look at the Getobject function, which can return an existing instance. You can trap the error if no existing instance exists and then use the Createobject if required.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top