I'm Trying to get control of the IE pop-up window in my VBA excel project with no success. Could someone please explain to me how to do this, I have looked around the internet but have not found a solution. When I use the debug print command in the code it tells me the pop-up window address bar is false and assuming it should be true. This is the last leg of my project and I would be very grateful to anyone who could provide some feedback.
Option Explicit
Sub mainproject()
Dim IE As New SHDocVw.InternetExplorer
Dim HTMLdoc As MSHTML.IHTMLDocument
Dim shell As SHDocVw.ShellWindows
Set shell = New SHDocVw.ShellWindows
IE.Visible = True
IE.navigate "http://www.flashscore.com/basketball/usa/nba/"
Do While IE.readyState <> READYSTATE_COMPLETE
Application.Wait Now + TimeValue("00:00:01")
Loop
'Debug.Print IE.LocationName, IE.LocationURL
IE.document.getElementById("fs-summary-fixtures").Children(0).Children(2).Children(1).Children(2).Click
For Each IE In shell
If IE.LocationURL = "http://www.flashscore.com/match" Then
'Set IE =
Exit For
End If
Debug.Print IE.LocationName, IE.LocationURL, IE.AddressBar, IE.Application
Next
Set IE = Nothing
Set shell = Nothing
End Sub
Option Explicit
Sub mainproject()
Dim IE As New SHDocVw.InternetExplorer
Dim HTMLdoc As MSHTML.IHTMLDocument
Dim shell As SHDocVw.ShellWindows
Set shell = New SHDocVw.ShellWindows
IE.Visible = True
IE.navigate "http://www.flashscore.com/basketball/usa/nba/"
Do While IE.readyState <> READYSTATE_COMPLETE
Application.Wait Now + TimeValue("00:00:01")
Loop
'Debug.Print IE.LocationName, IE.LocationURL
IE.document.getElementById("fs-summary-fixtures").Children(0).Children(2).Children(1).Children(2).Click
For Each IE In shell
If IE.LocationURL = "http://www.flashscore.com/match" Then
'Set IE =
Exit For
End If
Debug.Print IE.LocationName, IE.LocationURL, IE.AddressBar, IE.Application
Next
Set IE = Nothing
Set shell = Nothing
End Sub