tying combo boxes together

bucci35

Active Member
Joined
Jul 6, 2002
Messages
341
Office Version
  1. 365
Platform
  1. Windows
i have a combo box with categories in it
beef, poultry, lamb etc
I have another combo box with the items for each category.
What I want to do is tie these together so that when you click on beef for example it shows you all the beef products in the second combo box.
then when you select poultry in the first combo box it shows just the poultry items in the second combo box and etc.
Any ideas?

Thanks,
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
You need to code into the on_change event of the first combo box, so as to populate the second combo box.

For example:

Code:
'code run on change event of combo box

Select case mycombo.value
case "Beef"
combo2.additem "Steak"
combo2.additem "MinceMeat"
case "Chicken"
combo2.additem "Nuggets"
combo2.additem "Wings"
end select
 
Upvote 0
I"m not quite sure what you mean or how to do what you suggested. I didn't mention that the categories can total about 15, with the items for EACH category totalling at times 750.
 
Upvote 0
Hi,

take a look at this "famous" thread
(the link is already pointed to the "most relevant post")

http://www.mrexcel.com/board2/viewt...=0&postorder=asc&highlight=cascading&start=26

for a technique using comboboxes
http://www.mrexcel.com/board2/viewtopic.php?t=152281&start=5

see also this explanation
http://www.contextures.com/xlDataVal02.html

and
http://www.mrexcel.com/board2/viewtopic.php?t=15030&highlight=
feel free to send an email (no PM)
you'll get three files with examples

subject of email
cascading comboboxes

kind regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,264
Members
448,558
Latest member
aivin

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