Compartilhar via


Propriedade ComboBox.Column (Script do Outlook Forms)

Retorna ou define um valor Variant que representa um único valor, uma coluna de valores ou uma matriz bidimensional para carregar em um ComboBox. Leitura/gravação.

Sintaxe

expressão. Column(pvargColumn, pvargIndex)

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

Parâmetros

Nome Obrigatório/Opcional Tipo de dados Descrição
pvargColumn Opcional Variantes Um inteiro com um intervalo de 0 ao número total de colunas menos um.
pvargIndex Opcional Variantes Um inteiro com um intervalo de 0 ao número total de linhas menos um.

Comentários

If you specify both the column and row values, Column reads or writes a specific item.

If you specify only the column value, the Column property reads or writes the specified column in the current row of the object. Por exemplo, MyComboBox.Column (3) lê ou grava a terceira coluna no MyComboBox.

Column returns a Variant from the cursor. When a built-in cursor provides the value for Variant (such as when using the AddItem method), the value is a String. When an external cursor provides the value for Variant, formatting associated with the data is not included in the Variant.

Use Column para atribuir o conteúdo de uma caixa de combinação a outro controle, como uma caixa de texto.

If the user makes no selection when you refer to a column in a combo box or list box, the Column setting is Null. You can check for this condition by using the IsNull function.

You can also use Column to copy an entire two-dimensional array of values to a control. This syntax lets you quickly load a list of choices rather than individually loading each element of the list using AddItem.

When copying data from a two-dimensional array, Column transposes the contents of the array in the control so that the contents of ComboBox1.Column(X, Y) is the same as MyArray(Y, X). You can also use the List property to copy an array without transposing it.

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.