Share via


Selection.Type Property

Publisher Developer Reference

Returns a PbSelectionType constant that represents the selection type. Read-only.

Syntax

expression.Type

expression   A variable that represents a Selection object.

Remarks

The Type property value can be one of these PbSelectionType constants.

pbSelectionNone
pbSelectionShape
pbSelectionShapeSubSelection
pbSelectionTableCells
pbSelectionText

Example

This example checks to see if the selection is text and if it is, makes the selected text bold.

Visual Basic for Applications
  Sub IfCellData()
    Dim rowTable As Row
    If Selection.Type = pbSelectionText Then
        Selection.TextRange.Font.Bold = msoTrue
    End If
End Sub

See Also