Pastafarian
New Member
- Joined
- Feb 21, 2012
- Messages
- 30
Hi,
Been trying this for a long, long time now and I've yet to see a solution.
I have a sheet with names of customers in column A.
I also have a userform with a combobox. Its RowSource currently is the named range of all customers in A.
I now want users to search for customers containing some of the letters typed in the combobox.
So far i've tried:
-Autofilter + RowSource (not working)
-Autofilter + additem (working, but has duplicates and does not autofill the entire name) Code:
What is the best (most userfriendly and preferably easiest) way to do this?
Thanks in advance!
Been trying this for a long, long time now and I've yet to see a solution.
I have a sheet with names of customers in column A.
I also have a userform with a combobox. Its RowSource currently is the named range of all customers in A.
I now want users to search for customers containing some of the letters typed in the combobox.
So far i've tried:
-Autofilter + RowSource (not working)
-Autofilter + additem (working, but has duplicates and does not autofill the entire name) Code:
Code:
With Sheets("Customers")
.AutoFilterMode = False
.Range("A1:A1000").AutoFilter
.Range("A1:A1000").AutoFilter Field:=1, Criteria1:="=*" & ComboBox1.value & "*"
End With
For Each rCell In Sheets("Customers").Range("A1:A10").SpecialCells(xlVisible)
With Me.customers
.AddItem rCell.Value
End With
Next rCell
What is the best (most userfriendly and preferably easiest) way to do this?
Thanks in advance!