Search Box on UserForm

  • Using this code to search a name list to fill a userform listbox. It works perfect if you type in the letter of last name,is there a way to change it to read if you type in first name. So the code will work
    with either name? Seems I seen somewhere where the list would narrow down to a letter type,say S and it would show all last names with S


    Name List
    Smith Bob
    Jones Frank



    Thanks Z

  • Re: Search Box on UserForm


    The listbox list is driven from your search/find routine. You can change your search criteria to the first name field or include the first name with the last name in the worksheet cell then seperate the two when you select from the listbox. Clear?


    Streub

    [SIGPIC][/SIGPIC]Streub


    "Zero to Hero and Back in 6 Seconds."

  • Re: Search Box on UserForm


    Quote from Streub;681453

    The listbox list is driven from your search/find routine. You can change your search criteria to the first name field or include the first name with the last name in the worksheet cell then seperate the two when you select from the listbox. Clear?


    Streub


    Thanks Streub
    I don't understand what your saying

  • Re: Search Box on UserForm


    With a userform, I have always saved customer names using a separate textbox and cell for both. That is probably what you are doing now.


    If you save the last name and first name as one string to a cell it can be found in a search but you may need to add a separator " | "to your code in order to split one from another to populate a listbox or to populate two textboxes.


    Include your entire project in the next response so I or others can take a better look at it.

    [SIGPIC][/SIGPIC]Streub


    "Zero to Hero and Back in 6 Seconds."

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!