Hello,
I'm relatively new to vba programming but appreciate the helpful tips I've been able to read through other threads, so thank you for that! Here is my issue/goal...
I'm creating a userform to show several pieces of info about a specific client through looking them up on the userform. Info like address, phone number, email, etc.
The userform I've created begins with a textbox. In that textbox, you can type anything in. On Sheet4 of my workbook I have a dynamic list that runs the names of all my clients that contains that text, so that when I use a command button next to my textbox1 to "search" my clients based on textbox 1, it pulls up that dynamic list in a combobox. Then I choose one in the combobox and it shows all of the corresponding information (so that's taken care of) in labels.
I'm trying to figure out how to set up the combobox so that after I run the search with the command button, the number of rows in the combobox will reset based on the number of names that are now on the dynamic list.
I.e. I first search "xxxxxx" and one blank line shows up in combobox1 because no names contain "xxxxxx." Then when I perform a new search with, for example, "and", I should have several names pull up (andy, anderson, etc) but only the one line on combobox1 is visible and only pulls the first name available on the dynamic list. Also becomes a problem if I reverse it and pull up, for example, 20 names on the first search, and my second search yields a few clients with 20 lines visible - so several blank rows after the first few.
How do I adjust the combobox so that it resets the number of rows available after the search?
Please let me know what other info I can give you. There's probably a more efficient way to do this anyway, but almost everything has worked so far.
Cheers
Bookmarks