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

DeleteRows method

Deletes a row or rows. Returns the number of the last row (-1 if an error).

Applies to

TableData ArrData RsetData Xdata XShared

Parameters

Name Type Description
NumRows Long Number of rows to delete.
Pos Long (optional) Position of the row(s) to be deleted. If omitted, deletes at the end.
EntireRow Boolean (optional) Whether to delete an entire row.

Deletes a row or rows at the position Pos (if Pos is omitted, deletes at the end). If EntireRow is True, an entire row or rows is deleted, shifting everything below the new rows by one or more rows. If False, everything below the new row(s) is shifted up but only for the columns in the Tabledata object. The user must ensure that there is nothing below which will prevent the delete (such as a merged cell).