Skip to content

Instantly share code, notes, and snippets.

@TGDUY
Created May 21, 2018
Embed
What would you like to do?
Option Explicit
Private DMHH As Variant
Private Sub CB_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Dim TMP As Variant
If KeyAscii = 32 Then
TMP = FindInArray(Trim(CB.Text), DMHH)
If Not IsEmpty(TMP) Then
CB.List = TMP
CB.DropDown
Else
CB.Clear
End If
End If
End Sub
Private Sub UserForm_Initialize()
DMHH = S1.Range("A2:C" & S1.Cells(S1.Rows.Count, "A").End(xlUp).Row).Value2
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment