Created
May 21, 2018 15:59
-
-
Save TGDUY/51b6f1a77ec715dbbbdc88733ffad10a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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