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.

Set

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

Cells

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

Delete

Deletes the specified Row object.

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

ActiveWindow.RangeFromPoint.Table.Rows(1).Delete

Height

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

Parent

Returns the parent object for the specified object.

Select

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.

ActivePresentation.Slides(1).Shapes(2).Table.Rows(1).Select

Rows.Add

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()

Rows.Count

Returns the number of objects in the specified collection.

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

Rows.Item

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)

Rows.Parent

Returns the parent object for the specified object.