Skip to content

Latest commit

 

History

History
62 lines (38 loc) · 1.22 KB

PowerPoint.Cell.Selected.md

File metadata and controls

62 lines (38 loc) · 1.22 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Cell.Selected property (PowerPoint)
vbapp10.chm628008
vbapp10.chm628008
PowerPoint.Cell.Selected
3773ff08-043d-2b57-25ea-ba44cc30c77a
06/08/2017
medium

Cell.Selected property (PowerPoint)

Returns True if the specified table cell is selected. Read-only.

Syntax

expression.Selected

expression A variable that represents a Cell object.

Return value

Boolean

Example

This example puts a border around the first cell in the specified table if the cell is selected.

Sub IsCellSelected()

    Dim celSelected As Cell

    Set celSelected = ActivePresentation.Slides(1).Shapes(1) _
        .Table.Columns(1).Cells(1)

    If celSelected.Selected Then
        With celSelected
            .Borders(ppBorderTop).DashStyle = msoLineRoundDot
            .Borders(ppBorderBottom).DashStyle = msoLineRoundDot
            .Borders(ppBorderLeft).DashStyle = msoLineRoundDot
            .Borders(ppBorderRight).DashStyle = msoLineRoundDot
        End With
    End If

End Sub

See also

Cell Object

[!includeSupport and feedback]