SelLength, SelStart, SelText Properties (ActiveX Controls)

       

These properties aren't available at design time.

Syntax

object.SelLength [= number]

object.SelStart [= index]

object.SelText [= value]

The SelLength, SelStart, and SelText property syntaxes have these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
number A numeric expression specifying the number of characters selected. For SelLength and SelStart, the valid range of settings is 0 to text length — the total number of characters in the edit area of a ComboBox or TextBox control.
index A numeric expression specifying the starting point of the selected text, as described in Settings.
value A string expression containing the selected text.

Remarks

Use these properties for tasks such as setting the insertion point, establishing an insertion range, selecting substrings in a control, or clearing text. Used in conjunction with the Clipboard object, these properties are useful for copy, cut, and paste operations.

When working with these properties: