ListRows.Add Method

Excel Developer Reference

Adds a new row to the list object.

Syntax

expression.Add(Position)

expression   A variable that represents a ListRows object.

Parameters

Name Required/Optional Data Type Description
Position Optional Variant Integer. Specifies the relative position of the new row.

Return Value
A ListRow object that represents the new row.

Remarks

If Position is not specified, a new bottom row is added.

Example

The following example adds a new row to the default ListObject object in the first worksheet of the workbook. Because no position is specified, the new row is added to the bottom of the list.

Visual Basic for Applications
  Set myNewColumn = ActiveWorkbook.Worksheets(1).ListObject(1).ListRows.Add

See Also