Searching cells and populate listbox with results (userform)

Wicked_

Board Regular
Joined
Jun 5, 2018
Messages
81
Hi.
I've tried many different codes from different peoples, to make my search function to work, but with no hope, so i will be asking here.

So, what i want is this:

In A1, B1 and C1, i got different text (A1 = Tool ID: , B1 = Programs, C1 = Ordre)

and in the A column, i got different Tool ID's (example 500,501,502,503 etc etc)
and in the B column, i got program numbers
and in the C column, i got ordre numbers.

Then in the userform, i got a textbox and a listbox.
Within the textbox1, i want textbox1_change and when i type a number, it will show the result associated with the tool ID.

Example: If i got 100 Tool ID's and two of them got the tool id 500, and i search for 500, it will show these two results, with the tool id (500), and program number and ordre number.

I also use RowSource (name manager) with the code
VBA Code:
=OFFSET('Maskin 51'!$A$2;0;0; COUNTA('Maskin 51'!$A:$A)-1;5)
, to try to get the "bar" in the listbox to show "tool ID, program and ordre.

Anyone that can help me with this search and show result code?

If my explanation sucks, please ask, and i will try to explain better.

Thanks :)
 
I notice that after a while, it suddenly triggers the "we had some sort of problem" message, and cant search anymore because of it, if i restart the excel program and try again, it works, even if i save it first.
Strange.
I have always wondered what you plan to do with this script. Just seeing the results may not be all your doing. Is this all your doing with the script or is it only a small part of a larger script. If this is just a part of a larger script show me your entire script. I have run the script numerous times and had no problems. In the Vba properties window for the listbox do you have anything in RowSource? If so remove that.
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,214,577
Messages
6,120,359
Members
448,956
Latest member
Adamsxl

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