How to use a ComboBox with autocomplete and search as you type.

dagda13

Board Regular
Joined
May 18, 2019
Messages
52
Hi,

I have a ComboBox embedded in a worksheet that references a list of items. Ie:

small cat
cat
big cat
small dog
dog
big dog


Right now when I type in 'cat' i only get 'cat' as the suggestion. What I would like is to get all items that contain 'cat'., ie., in this case:

small cat
cat
big cat

Right now I have the "Match Entry" in the ComboBox Properties set to "1 - fmMatchEntryComplete", which allows me to filter by the characters at the beginning of each item, but I can't find a setting or code that will allow me to filter for characters that are contained within the item(s), and not just at the beginning.

Is there a way to do this? Thanks!
 
is there any way we can make the function dynamic without using listrange?
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
@am3dz
Welcome to MrExcel
is there any way we can make the function dynamic without using listrange?
Do you mean ListFillRange?
The searchable drop-down I mentioned in post #19 doesn't use ListFillRange & it's dynamic.
 
Upvote 0
Is there a way to apply this vba code in all active combo boxes i have??

in my worksheet i have 30 comboboxes. please help to have an auto complete and auto suggest on each combo boxes with the same list fillrange
 
Upvote 0
@XieJingXing, welcome to MrExcel.
Is there a way to apply this vba code in all active combo boxes i have??
Vba code in which post are you referring to?
in my worksheet i have 30 comboboxes.
Do you really that many comboboxes in the sheet?
Why not just use data validation & then use an add-in called “Search deList” to get a searchable combobox.
You can find it here:
 
Upvote 0
@XieJingXing, welcome to MrExcel.

Vba code in which post are you referring to?

Do you really that many comboboxes in the sheet?
Why not just use data validation & then use an add-in called “Search deList” to get a searchable combobox.
You can find it here:
Hello, Sir.

yes. I Have that much comboboxes on my table.
I just want to have an auto suggestion / autocomplete whenever the user enter a data on the active combobox.
As much as I want to have an add-in, my company PC is restricted to have it without their permission.


BTW, thank you for your help.
 
Upvote 0
I would just like to thank John_w for the worksheet combobox code. It's an incredibly useful feature and a massive improvement on the regular combobox filtering.

However, I haven't been able eliminate the bug identified in the post above despite spending the weekend on it. I have rearranged the .listrows = and .dropdown lines in every possible combination but the bug persists.

I have attached 5 images in sequence of typing three characters and then backspacing on two of them. The small number next to the combobox is a variable displaying the .listrows value which is correct but the .dropdown appears to be using the .listbox value for the previous entry.

I am having tbh a hard time making sense of it and so I wanted to ask if anyone have a working example of a worksheet combobox without the bug ?

Thanks again
 

Attachments

  • Pic1 ComboBox 1st character.png
    Pic1 ComboBox 1st character.png
    17.4 KB · Views: 26
  • Pic2 ComboBox 1st and 2nd characters.png
    Pic2 ComboBox 1st and 2nd characters.png
    18.3 KB · Views: 27
  • Pic3 ComboBox 1st 2nd 3rd characters.png
    Pic3 ComboBox 1st 2nd 3rd characters.png
    4 KB · Views: 23
  • Pic4 ComboBox 3 characters then delete 1.png
    Pic4 ComboBox 3 characters then delete 1.png
    7.4 KB · Views: 24
  • Pic5 ComboBox 3 characters then delete 2.png
    Pic5 ComboBox 3 characters then delete 2.png
    16.9 KB · Views: 26
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top