Hi guys, I looked at similar questions' answers and could not find that were applicable to what I am trying to do.
Here is some code that loads an instance of IE , goes to Apple's financials, and attempts to scrape the table on that webpage.
The error happens on Set IEDocument = IEObject.document
Also , for some reason, the line "Debug.Print IEObject.LocationURL" does not print anything in my immediate window, what am I missing here?
```
Sub ScrapeTable2()
Dim IEObject As InternetExplorer
Set IEObject = New InternetExplorer
IEObject.Visible = True
IEObject.navigate URL:="PLACEHOLDERURL"
Debug.Print IEObject.LocationURL
Dim IEDocument As HTMLDocument
Set IEDocument = IEObject.document
Dim IETables As IHTMLElementCollection
Dim IETable As IHTMLTable
Dim IERow As IHTMLTableRow
Dim IECell As IHTMLTableCell
Set IETable = IEDocument.getElementsByTagName("table")
RowCount = 1
max_rows = IETable.Rows.Length
For Each IERow In IETable.Rows
Debug.Print IERow.innerText
Next
End Sub
```
Bookmarks