Class Row (PowerPoint VBA)

The class Row represents a row in a table. The Row object is a member of the Rows collection. The Rows collection includes all the rows in the specified table.


To use a Row class variable it first needs to be instantiated, for example

Dim rw as Row
Set rw = ActiveWindow.RangeFromPoint.Table.Rows(Index:=1)

The following procedures can be used to set variables of type Row: Cell.Parent, Rows.Item, Rows.Add and Table.Rows


Returns a CellRange collection that represents the cells in a table column or row.

Dim creCells As CellRange
Set creCells = ActivePresentation.Slides(1).Shapes(2).Table.Rows(1).Cells


Deletes the specified Row object.

Attempting to delete the only existing row in a table will result in a run-time error.



Returns or sets the height of the specified object, in points.

The Height property of a Shape object returns or sets the height of the forward-facing surface of the specified shape. This measurement doesn't include shadows or 3D effects.

ActivePresentation.Slides(1).Shapes(2).Table.Rows(1).Height = 300


Returns the parent object for the specified object.


Selects the specified object.

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.



Returns a Row object that represents a row being added to a table.

Syntax : expression.Add (BeforeRow)

BeforeRow: The row before which the row is to be added.

Dim rw As Row
Set rw = ActiveWindow.RangeFromPoint.Table.Rows.Add()


Returns the number of objects in the specified collection.

Dim lngCount As Long
lngCount = ActivePresentation.Slides(1).Shapes(2).Table.Rows.Count


Returns a single Row object from the specified Rows collection.

Syntax : expression.Item (Index)

Index: The index number of the single Row object in the collection to be returned.

Dim rw As Row
Set rw = ActiveWindow.RangeFromPoint.Table.Rows(Index:=1)


Returns the parent object for the specified object.