04 InsertRows - AndrewMB2/Logic-Architect-for-Excel-VBA GitHub Wiki
InsertRows method
Inserts 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 insert. |
| Pos | Long (optional) | Position of the row(s) to be inserted. If omitted, inserts at the end. |
| EntireRow | Boolean (optional) | Whether to insert an entire row. |
Inserts a row or rows at the position Pos (if Pos is omitted, inserts at the end). If EntireRow is True, an entire row or rows is inserted, shifting everything below the new rows by one or more rows. If False, everything below the new row(s) is shifted down but only for the columns in the Tabledata object. The user must ensure that there is nothing below which will prevent the insert (such as a merged cell).