Partilhar via


Propriedade MatchEntry

Devolve ou define um valor que indica como uma Caixa de Listagem ou Caixa de Combinação procura a respetiva lista à medida que o utilizador escreve.

Sintaxe

objeto. MatchEntry [= fmMatchEntry ]

A sintaxe da propriedade MatchEntry tem as seguintes partes:

Sair Descrição
objeto Obrigatório. Um objeto válido.
fmMatchEntry Opcional. A regra utilizada para corresponder às entradas na lista.

Configurações

As definições para fmMatchEntry são:

Constant Valor Descrição
fmMatchEntryFirstLetter 0 Correspondência básica. O controlo procura a entrada seguinte que começa com o caráter introduzido. Escrever repetidamente a mesma letra percorre todas as entradas que começam com essa letra.
FmMatchEntryComplete 1 Coincidência estendida. Conforme cada caractere é digitado, o controle procura por uma coincidência de entrada coincidindo todos os caracteres introduzidos (padrão).
FmMatchEntryNone 2 Sem coincidência.

Comentários

The MatchEntry property searches entries from the TextColumn property of a ListBox or ComboBox.

The control searches the column identified by TextColumn for an entry that matches the user's typed entry. Upon finding a match, the row containing the match is selected, the contents of the column are displayed, and the contents of its BoundColumn property become the value of the control. If the match is unambiguous, finding the match initiates the Click event.

The control initiates the Click event as soon as the user types a sequence of characters that match exactly one entry in the list. As the user types, the entry is compared with the current row in the list and with the next row in the list. When the entry matches only the current row, the match is unambiguous.

In Microsoft Forms, this is true regardless of whether the list is sorted. Isto significa que o controlo localiza a primeira ocorrência que corresponde à entrada, com base na ordem dos itens na lista.

Note that in either case, the matched entry is not unique; however, it is sufficiently different from the adjacent entry that the control interprets the match as unambiguous and initiates the Click event.

Confira também

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.