Auto complete when typing any part of the word

0

How can I autocomplete text by typing any part of an information within the ListBox using VBA?

Example:

When you type in "Santos" all options containing this word will be listed / displayed in the listbox.

    
asked by anonymous 10.05.2017 / 14:55

1 answer

1

Hello,

first fill in the list then scroll through the items and create the filtered list

Dim i As Integer
'Percorre por todos itens do listbox
For i = 0 To List1.ListCount - 1
'Verifica se o item do listbox esta selecionado
if InStr(List1.List(i),valorDigitado) = 0 then
ListFiltrada.add(List1.List(i))
End If
Next

Something like that, I'm without windows to create the precise code

    
11.05.2017 / 04:05