내보내기(0) 인쇄
모두 확장

ListRows.Add Method (Excel)

Office 2010

Adds a new row to the table represented by the specified ListObject (영문).

.Add(Position, AlwaysInsert)

A variable that represents a ListRows object.

Parameters

Name

Required/Optional

Data Type

Description

Position

선택

Variant

Integer. Specifies the relative position of the new row.

AlwaysInsert

선택

Variant

Boolean. Specifies whether to always shift data in cells below the last row of the table when the new row is inserted, regardless if the row below the table is empty. If True, the cells below the table will be shifted down one row. If False, if the row below the table is empty, the table will expand to occupy that row without shifting cells below it; but if the row below the table contains data, those cells will be shifted down when the new row is inserted.

Return Value

A ListRow (영문) object that represents the new row.

If Position is not specified, a new bottom row is added. If AlwaysInsert is not specified, the cells below the table will be shifted down one row (same as specifying True).

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.

Set myNewColumn = ActiveWorkbook.Worksheets(1).ListObject(1).ListRows.Add
Microsoft는 MSDN 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 MSDN 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.

참여하시겠습니까?
표시:
© 2014 Microsoft