HideSelection property

Specifies whether selected text remains highlighted when a control does not have the focus.

Syntax

object.HideSelection [= Boolean ]

The HideSelection property syntax has these parts:

Part Description
object Required. A valid object.
Boolean Optional. Whether the selected text remains highlighted even when the control does not have the focus.

Settings

The settings for Boolean are:

Value Description
True Selected text is not highlighted unless the control has the focus (default).
False Selected text always appears highlighted.

Remarks

Use the HideSelection property to maintain highlighted text when another form or a dialog box receives the focus, such as in a spell-checking procedure.

See also

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.