Internet explorer

A

Atishoo

How might I refer to an open instance of internet explorer?
I want to return the web address of an open instance of IE in a cell
If it were a web browser object it would be this:

sheets.("Main Board").Range("C1")=webbrowser1.location URL

What do I need to replace "webbrowser1" with??
 
T

Tim Williams

Sub ListIeUrls()

Dim objShell As Object, o As Object

Set objShell = CreateObject("Shell.Application")
For Each o In objShell.Windows
If TypeName(o.document) Like "HTMLDocument*" Then
Debug.Print o.document.Location
End If
Next o

End Sub

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top