I very much like this link:
Populate userform combobox with unique values from a range
It explains how to get a drop down list of unique values and that is exactly what I need but I have almost 7000 options.
I want the user to be able to start typing the value and have the drop-down populate the first match.
For example, if the user is typing 442810004 and they enter the first five digits and the next value that matches is 442810004 then the user should be able to hit enter to accept this value and go onto the next drop-down.
Populate userform combobox with unique values from a range
It explains how to get a drop down list of unique values and that is exactly what I need but I have almost 7000 options.
I want the user to be able to start typing the value and have the drop-down populate the first match.
For example, if the user is typing 442810004 and they enter the first five digits and the next value that matches is 442810004 then the user should be able to hit enter to accept this value and go onto the next drop-down.
Code:
Private Sub UserForm_Initialize()
Dim v, e
With Sheets("Segments Lookup").Range("AL2:AL6864")
v = .Value
End With
With CreateObject("scripting.dictionary")
.comparemode = 1
For Each e In v
If Not .exists(e) Then .Add e, Nothing
Next
If .Count Then Me.ComboBox1.List = Application.Transpose(.keys)
End With
End Sub
Last edited: