April 2006
Beginner
1114 pages
98h 16m
English
listrow.Delete
Removes a row from a list, deleting the data it contains and shifting rows up. The Add method acts on the ListRows collection, whereas the Delete method acts on the ListRow object.
Use the ListObjects
Item method to get the row to delete. For example, the following code deletes the second row of a list (undoing the code shown for the previous Add method):
Sub DeleteRow( )
Dim ws As Worksheet, lst As ListObject
Set ws = ActiveSheet
Set lst = ws.ListObjects("Test List")
lst.ListRows(2).Delete
End SubRead now
Unlock full access