SelLength Property

Applies To   See Also

Returns the number of characters the user selects in a text-entry area of a control, or specifies the number of characters to select. Not available at design time; read-write at run time.

Syntax

[Form.]Control.SelLength[= nLength]

Settings

nLength

Specifies the number of characters selected. Selected text appears highlighted. The valid range of settings is 0 to the total number of characters in the control. Setting SelLength to less than 0 causes a run-time error.

Remarks

Use this property with the SelStart and SelText properties for tasks such as:

When working with these properties, be aware of the following behaviors: