Muokkaa

Jaa


ComboBox.TextColumn Property (Outlook Forms Script)

Returns or sets a Variant that identifies the column in a ComboBox to display to the user. Read/write.

Syntax

expression.TextColumn

expression A variable that represents a ComboBox object.

Remarks

Values for the TextColumn property range from -1 to the number of columns in the list. The TextColumn value for the first column is 1, the value of the second column is 2, and so on. Setting TextColumn to 0 displays the ListIndex values. Setting TextColumn to -1 displays the first column that has a ColumnWidths value greater than 0.

When the user selects a row from a ComboBox, the column referenced by TextColumn is stored in the Text property. For example, you could set up a multicolumn ComboBox that contains the names of holidays in one column and dates for the holidays in a second column. To present the holiday names to users, specify the first column as the TextColumn. To store the dates of the holidays, specify the second column as the BoundColumn.

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.

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.