Cell.Selected property (Publisher)
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.