VBA Automation of Internet Explorer Child Window

Joined
Oct 2, 2008
Messages
3
Reaction score
0
I have code that allows me to start IE, parse the page and "click" the link contained in the page.

The link opens a child window with the target of the link. I am able to continue to automate and interact with the primary instance of IE (that was started by the code to begin with).

I need to be able to automate and interact with the child instance that was opened by clicking the link. Any help is greatly appreciated.
 
Joined
Oct 2, 2008
Messages
3
Reaction score
0
This is the code I have - it works well on the initial window and navigates to the child window. Hope this clears things up a little...


Code:
Sub ParseReportFromWeb()
Set appIE = New InternetExplorer
sURL = "[url="http://basesvr/app1/main.aspx"]http://basesvr/app1/main.aspx[/url]#"
With appIE
	.Navigate sURL
	.Visible = True  'allows for viewing the web page
End With

' loop until the page finishes loading
Do While appIE.Busy: Loop

'go thru each link element and list info
Set ElementCol = appIE.Document.getElementsByTagName("a")

For Each Link In ElementCol
	If InStr(1,Link.innerText, "Run Report") <> 0 Then
		Link.Click
		Exit For
	End If
Next Link

Do While appIE.Busy
	Loop
 
' the report window pops up and I need code to manipulate
End Sub
 

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