04 DropRow - AndrewMB2/Logic-Architect-for-Excel-VBA GitHub Wiki

DropRow method

Drops a row or rows from the end. Returns the number of the last row, or -1 if an error.

Applies to

TableData ArrData RsetData Xdata XShared

Parameters

Name Type Description
NumRows Long (optional) Number of rows to be dropped (if omitted, assumes one row).

Drops the last NumRows rows. If a table, resizes it but otherwise does not change the worksheet. The user must leave at least one data row if the TableData object is a table with data in first row as in this case the table will always have at least one row. Returns the number of rows. If there is an error returns -1.