I'm using the code below to open up ie and navigate to a website. However, when I navigate around to get to the data I need, a new window pops up with the results that I need to retrieve. How do I set the focus to the new window so I can interact with that?
Thanks.
Thanks.
Code:
Sub Update()
Set Ie = CreateObject("InternetExplorer.Application")
With Ie
.Visible = True
.Navigate "http://..."
Do Until .ReadyState = 4: DoEvents: Loop
Do While .Busy: DoEvents: Loop
.Navigate "javascript:doExport('exportdlg')"
'a new window has now popped up.
'need code here to work with it.
end sub