Show product selection only if there is stock?

Chronix99

New Member
Joined
Oct 2, 2011
Messages
19
Hey guys,

I have to write a bit of code for a small database where I'm using Excel/VBA.

I have the following database of roses that are for sale within a small company:



I have a userform running that looks like this:


I need a piece of code, where when the user selects the type of ROSE - the code will look up the available stock of each CATEGORY of that particular ROSE (i.e Ground Cover, Climber, Standard or Bush)

In the second list box, I need to show only the variety selection if there is stock (i.e Quantity > 0)

So in this instance, when the "PEACE" selection is made, the second list box should only have "BUSH" and "STANDARD"

I have no idea how to get this working.... any help?

I've gotten up to the bit of getting the first listbox and capturing the selection there, but no idea how to use this selection to fill the second list box.
 
Ahhh silly me! Before you helped me with this code, I just had a static listing of the four varieties so I could check if everything else works and well I forgot to remove that static listings! Just removed that code and now its finee!

Thank you so much Mick! :D
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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