ListRows Property

Microsoft Office Web Components Visual Basic

ListRows Property

Returns a ListRows collection that represents all the rows of data in the ListObject object. It does not include the header or insert rows. Read-only.

expression .ListRows

expression    Required. An expression that returns a ListObject object.

Remarks

You use the ListRows property to return the ListRows collection for a specified ListObject object. Then you iterate through the ListRows collection to get each ListRow object on that worksheet.

Example

The following example shows you how to retrieve list row information for a specific list row, in this case, the eighth row.

    Dim objLists
Dim objLRows
Dim objLRow

Set objLists = Spreadsheet1.ActiveSheet.ListObjects
Set objLRows = objLists.Item(1).ListRows
	
' Save the list row information of list row number 8 to a variable. 
Set objRow = objLRows.Item(8)

' Work with the list row information here.