This is kind of a repost to reorganize my question but:
I'm trying to match my spreadsheets cell B1 text with all the cells in the 10th column of a table on a webpage. If theres a match, I want to copy that rows cell 4 text. So far I have:
Dim colRows As Object
Dim objDataGrid As Object
Dim xobj1 As Object
Dim xcel As Object
Set objDataGrid = IE.Document.getElementById("DataGridReservations")
Set colRows = objDataGrid.getElementsByTagName("tr")
For Each element In colRows
Set xcel = colRows.getElementsByTagName("td")
If Range("B1").Text = xcel.Item(9).innertext Then
Range("H" & (ActiveCell.Row)) = xcel.Item(3).innertext
Else
Range("H" & (ActiveCell.Row)) = "0"
End If
Exit For
Next
I'm getting an error at the line
set xcel = colRows.getElementsByTagName....
Pulling my hair out. Also, just to be sure, "For Each element in colRows" element will only refer to "getElementsbyTagName("tr")" that I defined in set colRows. it wont also pickup the td tags bracketed in tr right?