Combo box dropdowns

jondallimore

Board Regular
Joined
Apr 26, 2012
Messages
136
Hello,

I am using an activeX combo box to produce a dropdown menu from a named range.

Is it possible to create a diminishing list, ie once a choice is chosen, it disappears from the list (but not from the named range)?

It would need to come back onto the list if it is de-selected at any point.

If anyone can point me towards the right brick wall to bash my head against til its squishy, I would be greatful.

Thanks
Jon
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
If you are directly populating the combobox from the named range then you can't remove items from the list without removing them from the range.
 
Upvote 0
What you could is use code to populate the combobox from the range and then you would be able to remove items from the list, without them being removed from the range.

You could do that in the activate event of the worksheet the combobox is on.
Code:
Private Sub Worksheet_Activate()
    Me.ComboBox1.List = Range("MyNamedRange").Value
End Sub
Then to remove the selected item you can use this.
Code:
 If Me.ComboBox1.ListIndex <> -1 Then
        Me.ComboBox1.RemoveItem Me.ComboBox1.ListIndex
 End If
Not sure where you would put that code, really depends on what you are doing with the combobo and the values you are selecting.
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,421
Members
448,961
Latest member
nzskater

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