While looping through an SAP table, I get the run time error 614 "The enumerator of the collection cannot find en element with the specified index", when I reach a blank row.
Using the Rowcount method does not get me the the correct amount of non-blank rows. Any ideas on how I can get rid of the error or get another way to loop through only non-blank rows?
Sub Process1
Dim SAP_table1 AS Object
Dim RowAmount As Integer
// Specifying SAP table
RowAmount = SAP_table1.RowCount // Does not return the correct amount of non-blank rows
Do While SAP_table1.Columns.Item(1).ElementAt(J).DisplayedText <> "" // I get the run time error 614 here when I reach a blank cell
// Do something
J = J + 1
Loop
End Sub