Table of contents
TOC
Collapse the table of content
Expand the table of content

Cell.Selected Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns True if a cell is selected. Read-only Boolean.

Syntax

expression. Selected

_expression_A variable that represents a Cell object.

Example

This example determines if a cell in the specified table is selected and if it is, enters text into the cell.

Sub IsCellSelected() 
 Dim cel As Cell 
 With ActiveDocument.Pages(1).Shapes(1).Table 
 For Each cel In .Cells 
 If cel.Selected Then 
 cel.TextRange.Text = "This cell is selected." 
 End If 
 Next cel 
 End With 
End Sub
© 2018 Microsoft