Compartilhar via


Propriedade ComboBox.TextColumn (Script do Outlook Forms)

Returns or sets a Variant that identifies the column in a ComboBox to display to the user. Leitura/gravação.

Sintaxe

expressão. TextColumn

expressão Uma variável que representa um objeto ComboBox.

Comentários

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.

Suporte e comentários

Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.