I have a user form and some combo boxes with drop down lists. However one of the combo boxes has almost 1000 items in the drop down and I\'d like the user to be able to star
You may try something like this...
Place the following code on UserForm Module. Change the Sheet and Range references if required.
Private Sub cboProgrammeName_Change()
Dim ws As Worksheet
Dim x, dict
Dim i As Long
Dim str As String
Set ws = Sheets("XXX")
x = ws.Range("ProgrammeNameList").Value
Set dict = CreateObject("Scripting.Dictionary")
str = Me.cboProgrammeName.Value
If str <> "" Then
For i = 1 To UBound(x, 1)
If InStr(LCase(x(i, 1)), LCase(str)) > 0 Then
dict.Item(x(i, 1)) = ""
End If
Next i
Me.cboProgrammeName.List = dict.keys
Else
Me.cboProgrammeName.List = x
End If
Me.cboProgrammeName.DropDown
End Sub