Userform-how to dynamically update listboxes based on select

anduls

New Member
Joined
Dec 13, 2005
Messages
1
I’m trying to find the best approach for the following:

I’m working on Userform which is some sort of system design tool.
I have limited choice of items to select (less than 10) and limited capacity of how many items can be selected (limited number of slots where those items fit in). There are also conditions like:
1) Some of items will take one slot space, some will take two
2) Some items you can have only one per system, some two some without limitation.

My idea was to use number of listboxes where user selects items needed. There is no problem to populate the listbox with items, but I’m not sure about how to update following listboxes based on choices user has already made and limits and rules I described earlier.

~anduls
 

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

Dragon_SDC

Board Regular
Joined
Aug 17, 2002
Messages
56
Suppose your main listbox was named Box1. In the code for the form add:
Code:
Private Sub Box1_Change()

'Code to do stuff with other listboxes goes here

End Sub

This will be run when you change the selected item in your mail listbox.


HTH
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,057
Messages
5,835,161
Members
430,343
Latest member
t0m_c

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
Top