List Box and Combo Box queries

Eurekaonide

Active Member
Joined
Feb 1, 2010
Messages
433
Hi All

I wonder if you can advise on a query regarding list or combo boxes within a user form please?

1) I would like a list box or combo box to show all the options which are currently held within a certain column of my worksheet (This will be changing and adding as time goes on) and I would like this to be picked up automatically

2) I have 1a little combo boxe with the pre-determined items already added in but, I would like another combo box or list next to it to show a set given selection depending on which item is chosen in the first box.

can these be done?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Thanks for this, I have the first one working.
2) however I am receiving an error message stating "Could Not Set the Row Source Property. Invalid Property Value"

Here is my code;

HTML:
Private Sub ListBox2_Change()
    ListBox3.RowSource = "ProjectName" & ListBox2.ListIndex + 3
    ListBox3.ListIndex = -3
End Sub

I had used the +3 and -3 as the two cells are not adjacent to one another but 3 columns apart. Basically I suppose its a bit of a lookup as I want to select the entry now showing in the first ListBox2 and upon that selection I want the ListBox3 to show the data which is in Cell H of that same row? If you think you know of a better way of doing this would appreciate your thoughts.
 
Upvote 0
Yes I have realised this and now changed it to a TextBox.

The "ProjectName" is the named range for the First lookup listBox2.
 
Upvote 0
Try eg:

Code:
Private Sub ListBox2_Change()
    With ListBox2
        TextBox1.Text = Range(.RowSource).Cells(.ListIndex + 1, 4)
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,839
Members
452,948
Latest member
UsmanAli786

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