Share via


Column.Cells Property

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

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
ReadOnly Property Cells As CellRange
    Get
'Usage
Dim instance As Column
Dim value As CellRange

value = instance.Cells
CellRange Cells { get; }

Property Value

Type: Microsoft.Office.Interop.PowerPoint.CellRange
CellRange

Examples

This example creates a new presentation, adds a slide, inserts a 3x3 table on the slide, and assigns the column and row number to each cell in the table.

Dim i As Integer

Dim j As Integer

With Presentations.Add

    .Slides.Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select

    Set myTable = .Slides(1).Shapes(1).Table

    For i = 1 To myTable.Columns.Count

        For j = 1 To myTable.Columns(i).Cells.Count

            myTable.Columns(i).Cells(j).Shape.TextFrame _

                .TextRange.Text = "col. " & i & "row " & j

        Next j

    Next i

End With

See Also

Reference

Column Interface

Column Members

Microsoft.Office.Interop.PowerPoint Namespace