Auto complete when typing any part of the word

Asked

Viewed 1,105 times

0

How can I self-cmplete the text when typing any part of an information inside the Listbox using VBA?

Example:

When typing the "Santos" all options containing that word will be listed / presented in the listbox.

  • I didn’t really understand your question, but check this URL: https://support.office.com/en-us/article/Fill-data-automatically-in-worksheet-cells-74e31bdd-d993-45da-aa82-35a236c5b5db Maybe it’ll help.

  • I actually created a listbox to feed a cell, and I wanted to have a word or part of it in the listbox to display all the items that contain part of that typed word.

1 answer

1


Hello,

first fill in the list then go 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 this, I am without windows to create precise code

Browser other questions tagged

You are not signed in. Login or sign up in order to post.