PDA

View Full Version : [SOLVED:] Filter as you type combobox



cjmitton
05-24-2016, 01:55 AM
I have a little VBA form that appears with a combobox. This combobox is populated from a .txt file at the moment which has a list of email address in. This all works fine and at current only has about five entries for testing purposes. I use this form in both Word 2010 and Excel 2010 as part of a bigger 'program' to create emails with attachments.

Soon this list will have about 25 email addresses and will not be in a particular order, I'd like the ability to filter as the person types to narrow down the list.

So for example if I start to type 'br' my dropdown list would filter / show only the entries starting 'br'.

I'm starting to think that I'll need to make some little database up so I can use a SQL statement or alike for it to work but was hoping for something simpler for now.

Thanks.

gmaxey
05-24-2016, 04:22 AM
Why don't you sort your list to start with and use the MatchEntry property of the combobox.

cjmitton
05-24-2016, 06:54 AM
Great, that worked! I didn't know what that property actual did so something new learned today!

Thanks.