Hi Everyone,
I have a column in excel which i want to select via Combobox dynamically by searching string in textbox both Ucase and Lcase.
My Data Example
Query(column name)
Installing R
Vlookup in R
Pivot in R
Concatenate in R
I want to see all the values in the drop down of combobox when textbox is empty.
when any string is entered in textbox only matching value should appear in the combobox dropdown.
My Code : In my code when textbox is empty combobox is also empty and it is case sensitive too
Code
Private Sub TextBox1_Change()
Dim rng As Range, e
With Me
.ComboBox1.Clear
If Len(.TextBox1.Value) Then
For Each e In Worksheets("Sheet1").Range("A2", Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp)).Value
If (e <> "") * (e Like "*" & .TextBox1.Value & "*") Then
.ComboBox1.AddItem e
End If
Next
With .ComboBox1
If .ListCount > 0 Then .ListIndex = 0
End With
End If
End With
End Sub
Display More
Thanks in advance