Jason
Jason

Reputation: 506

In Excel can a listbox have a drop down instead of the scroll bar?

I am replacing some of the combo boxes in my spreadsheet for list boxes so users can select more than one item. the problem that I am running into is that i have a long list of items and I don't have the space to make the listbox show multiple lines. It would best if I can make the listbox look and act like a combobox with that ability to select more than one item. I can't seem to find the property to make the list box have a dropdown menu.

The middle control in the picture is the listbox and you can see the scroll bar. Scrolling through 30 items like that isn't practical. Is there a property to give it a pull down menu like combo boxes?

enter image description here

thanks.

Upvotes: 0

Views: 5648

Answers (2)

Jason
Jason

Reputation: 506

I decided the best way for me would be to add an item in the combobox called 'multiple' that when selected opens a userform with a listbox that lets the user select multiple items. I put all the selected items into an array and then pass them back to the worksheet. It's not as straight forward as I wanted but it keeps the worksheet clean. Thanks for you help.

Upvotes: 1

David G
David G

Reputation: 2347

I don't think that's possible so this isn't a direct answer, but the next best thing you could have is a locked textbox next to a combo. If you want to show the results of their choice, a user can click on something in the combo and the textboxwould write it like this:

optionA

If the user selects a second one from the combo, the textbox appends the second one:

optionA; optionB

Sort of like e-mail recipients.

Have a small button next to that so the users can clear the textbox if they make a mistake.

I can help with the code if needed.

Upvotes: 0

Related Questions