Hi all,

I have a excel VBA script that basically iterates through links within a web page, opens up each link, within that new window, tests the links in there for 404 broken links. This script works fine when I initialize with ie10, but crashes with ie11 at the end of a for each loop.

The browser crashes at the end of my for each loop (last element within ielinks_inner_only) and restarts automatically the browser so that I can't even do ie2.quit showing a popup that says "An unexpected error has occurred".


Set ielinks_inner_only = IE2.Document.querySelectorAll("div.ps-footnotes a")
 
For Each links_inner In ielinks_inner_only
    If links_inner.className = "navigationLink" Then
                        
        linkstocheck = links_inner.href
        LastRow2 = Worksheets(1).UsedRange.Rows.Count
        Worksheets(1).Hyperlinks.Add Range("A" & LastRow2 + 1), linkstocheck
                        
        If (GetResult(linkstocheck)) Then
            Worksheets(1).Range("B" & LastRow2 + 1).Value = "Good"
        Else
            Worksheets(1).Range("B" & LastRow2 + 1).Value = "Bad"
        End If
                        
    End If

Next links_inner
Does anyone know what is causing this problem or have any insight? Again to reiterate - this is specific to IE11, and no such errors exist in IE10; however, I need it to work for IE11.

Thanks all for your time in advanced!

Jason