ComboBox.Text Property

Outlook Forms Script Reference

Returns or sets a String that specifies text in a ComboBox, changing the selected row in the control. Read/write.

Syntax

expression.Text

expression   A variable that represents a ComboBox object.

Remarks

The default value is a zero-length string ("").

You can use Text to update the value of the control. If the value of Text matches an existing list entry, the value of the ListIndex property (the index of the current row) is set to the row that matches Text. If the value of Text does not match a row, ListIndex is set to –1.

When the Text property of a ComboBox changes (such as when a user types an entry into the control), the new text is compared to the column of data specified by TextColumn.

You cannot use Text to change the value of an entry in a ComboBox; use the Column or List property for this purpose.

The ForeColor property determines the color of the text.

See Also