Macro to filter through list of names in a listbox

pimp_mentality

New Member
Joined
Oct 15, 2015
Messages
46
Hey guys i would like some help fine tuning my userform.

Here is the deal. I have a UserForm with several TextBoxes and a Listbox which is populated with a list of names once the form is open. When I click on a name from the list, information related to that name populates the varied TextBoxes alphabetically.

The thing is the list has grown quite a bit now so what I would like to do is to have a textbox on top of the list box for searching purposes. the idea is as the user types a name in the searchbox it would filter through the names in the list boxes simultaneously as the user types. So in other words if the user is searching for the name Dave when the user types "D" the listbox list jumps to D then when they type "Da" it jumps to all name with starting with Da and so forth.

Now I think this is possible by way outside my novice coding skills. So any assistance would be appreciated
 
The code I had previously would display in the designated TextBox the number of the last row containing data thereby letting my know how many entries where currently in the database this now longer works when I integrate the new code. This latest code also does not work unfortunately it displays the data contained in the last row of B2. Hopefully my explanation of what I am trying to accomplish will further aid in providing solution for my problem.
 
Last edited:
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Ok, try this:
Code:
TextBox9.text = Sheets("PI").Cells(Rows.count, "B").End(xlUp).row - 1
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,125,002
Members
449,202
Latest member
Pertotal

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top