Class ListRow (Excel VBA)
The class ListRow represents a row in a table. The ListRow object is a member of the ListRows collection. To use a ListRow class variable it first needs to be instantiated, for example
Dim lstrw as ListRow
Set lstrw = ActiveCell.ListObject.ListRows(Index:=1)
For Each
Here is an example of processing the ListRow items in a collection.
Dim lstrw As ListRow
For Each lstrw In ActiveCell.ListObject.ListRows
Next lstrw
Delete
Deletes the cells of the list row and shifts upward any remaining cells below the deleted row. You can delete rows in the list even when the list is linked to a SharePoint site. The list on the SharePoint site will not be updated, however, until you synchronize your changes.
ActiveCell.ListObject.ListRows(1).Delete
Index
Returns a Long value that represents the index number of the ListRow object within the ListRows collection.
Dim lngIndex As Long
lngIndex = ActiveCell.ListObject.ListRows(1).Index
Range
Returns a Range object that represents the range to which the specified list object in the list applies.
Dim rngRange As Range
Set rngRange = ActiveCell.ListObject.ListRows(1).Range