I am trying to read in a table of numbers from an investing website. The link is located below.
Income Statement for Coach Inc (COH) from Morningstar.com
I'm reading it in using the vba code below:
The good thing is that it seems to work fine at grabbing the values. The problem is that once it's completed, when it tries to move on to the next line of code, IE crashes with a "IE has stopped responding" type of error, and windows has to re-open IE. Unfortunately, this causes my code to stop because the instance of IE quit. Anyone know why IE would be crashing at the end of these lines of code?
Any help would be appreciated. THanks
Income Statement for Coach Inc (COH) from Morningstar.com
I'm reading it in using the vba code below:
Code:
Dim Income As Object
Dim Incomee As Object
Set Income = IE.Document.getElementsByClassName("r_xcmenu rf_table")(0).querySelectorAll("div.rf_crow, div.rf_crow0, div.rf_subtotal")
For Each Incomee In Income
For j = 0 To Incomee.all.length - 1
ActiveCell.Offset(0, j) = Incomee.all(j).innerText
Next
ActiveCell.Offset(1, 0).Select
Next
The good thing is that it seems to work fine at grabbing the values. The problem is that once it's completed, when it tries to move on to the next line of code, IE crashes with a "IE has stopped responding" type of error, and windows has to re-open IE. Unfortunately, this causes my code to stop because the instance of IE quit. Anyone know why IE would be crashing at the end of these lines of code?
Any help would be appreciated. THanks