Abulafia
Board Regular
- Joined
- Jun 15, 2004
- Messages
- 66
I have a table on a sheet. The table (called TBL_Data) has three columns.
The table is assigned to a ListObject object, called loData.
The problem I seem to be having is that when I loop through the items in the table I am finding that the lr.Range appears to be skipping a row.
Struggling to find out why, despite all the debugging. Guessing my approach is just wrong.
Suggestions?
The table is assigned to a ListObject object, called loData.
The problem I seem to be having is that when I loop through the items in the table I am finding that the lr.Range appears to be skipping a row.
Code:
Dim lngCounter As Long
Dim lngRows As Long
Dim lr As ListRow
lngRows = loData.ListRows.Count
For lngCounter = 1 To lngRows
Set lr = loData.ListRows.Item(lngCounter)
Debug.Print Format(lr.Index, "00") & " | " & lr.Range.Address & " | " & lr.Range(lngCounter, 1) & " | " & lr.Range(lngCounter, 2) & " | " & lr.Range(lngCounter, 3)
Next lngCounter
Struggling to find out why, despite all the debugging. Guessing my approach is just wrong.
Suggestions?