ListObject.ListRows Property

Excel Developer Reference

Returns a ListRows object that represents all the rows of data in the ListObject object. Read-only.



expression   A variable that represents a ListObject object.


The ListRows object returned does not include the header, total, or Insert rows.


The following example deletes a row specified by number in the ListRows collection that is created by a call to the ListRows property.

Visual Basic for Applications
  Sub DeleteListRow(iRowNumber As Integer)
    Dim wrksht As Worksheet
    Dim objListObj As ListObject
    Dim objListRows As ListRows
    Set wrksht = ActiveWorkbook.Worksheets("Sheet1")
    Set objListObj = wrksht.ListObjects(1)
    Set objListRows = objListObj.ListRows
If (iRowNumber <> 0) And (iRowNumber < objListRows.Count - 1) Then
End If

End Sub

See Also