+ Reply to Thread
Results 1 to 4 of 4

Auto-refreshing combobox list when user is entering letters

  1. #1
    Registered User
    Join Date
    02-22-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Auto-refreshing combobox list when user is entering letters

    Hi,

    I've got some experience with forms and I've tried to find the answer, but it seems to be to difficult.

    I want to make a form with a field (combobox, listbox or text box - I don't know which will be most suitable in this case) that will be auto resfreshing at the time of writing based on entry the user is making. The suggestions should be seen as a list of rows up to 10 and should be visible by user "online". My list of words would be around 500 and scrolling down to find the right one is impossibe.

    Autocomplete method shows only 1 suggestion and gives only word that starts with the letter of list. I'd like to have more suggestions rows and also with combinations of inside letter combination.

    Have any of you heard about this kind of procedure or idea? I guess that event procedures might be helpful here. I'd be so much pleased for any suggestions.
    Daniel

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Auto-refreshing combobox list when user is entering letters

    The attached file has a UserForm with a Textbox for user input and a Listbox for matched suggestions. As the user types in the textbox, the Listbox automatically updates with matches that contain the typed text. The user can select a suggestion from the Listbox.

    Suggestive List.xls
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    02-22-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Auto-refreshing combobox list when user is entering letters

    Hi Alphafrog,

    many thanks. In my case I have created 120 textboxes (yes I know ... so many) and I want your procedure works in all of them. I though about adding a tag to all textboxes, but what might be the tigger to run that the proceure?

    So I click to any of 120 textboxes and your procedure start showing me suggestions, but I don't want to create each subprocedure for each textbox. Is there an event like "on userform click event". Is this a good direction? I can attach a file, if it will be helpful.

    thanks,
    Daniel

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Auto-refreshing combobox list when user is entering letters

    Quote Originally Posted by DanielTu View Post
    Hi Alphafrog,

    many thanks. In my case I have created 120 textboxes (yes I know ... so many) and I want your procedure works in all of them. I though about adding a tag to all textboxes, but what might be the tigger to run that the proceure?

    So I click to any of 120 textboxes and your procedure start showing me suggestions, but I don't want to create each subprocedure for each textbox. Is there an event like "on userform click event". Is this a good direction? I can attach a file, if it will be helpful.

    thanks,
    Daniel
    I can't imagine having to fill-in a userform with 120 text boxes even if they had a suggestion list. You would lose me after about ten or twenty.

    Does that mean each textbox will have a different list to get suggestions from?

    You can trap the textbox_change events with a custom class. Here's one example
    Handle Multiple UserForm Buttons With One Subroutine

    Do a web search for something like
    Excel VBA WithEvents

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Reading the last 2 letters in a combobox value and enter those 2 letters into column
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-26-2013, 09:26 AM
  2. Calling a user form initialize sub when entering the form to populate combobox...
    By regupnorth in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-02-2012, 07:24 AM
  3. Add to combobox list by entering new text in textbox
    By processchip in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2012, 09:13 AM
  4. refreshing ComboBox values
    By viewmaster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2006, 09:07 PM
  5. [SOLVED] How to auto Sort list after entering last item in a row.
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2006, 09:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1