Consulting

Results 1 to 3 of 3

Thread: Filter as you type combobox

  1. #1
    VBAX Regular
    Joined
    Sep 2012
    Posts
    63
    Location

    Filter as you type combobox

    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.

  2. #2
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,340
    Location
    Why don't you sort your list to start with and use the MatchEntry property of the combobox.
    Greg

    Visit my website: http://gregmaxey.com

  3. #3
    VBAX Regular
    Joined
    Sep 2012
    Posts
    63
    Location
    Great, that worked! I didn't know what that property actual did so something new learned today!

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •