Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Selecting More than one item from a drop down list in Excel

0

Please can somebody help me, I need my colleagues to be able to select more than one item from a drop down list, the results must display in one cell with commas separating them.  I would appreciate any help you can offer.  Everything I know in Excel has been self taught and mostly learnt from teachexcel.

Answer
Discuss

Answers

0

The attached workbook contains VBA code to make an ActiveX ListBox work almost like a drop-down, allowing multiple selections and displaying them in a cell. You may have to learn a little about the ListBox control.

To start you off, click Design Mode on the Ribbon's Developer tab. Then right-click the ListBox on the attached workbook and select Properties from the menu that opens. In the dialog box that appears you can adjust the size and location of the ListBox as well as its appearance. Observe that the ListFillRange property points to "List" which is the name I gave to the range A1:A10 on the worksheet. You might change the property's value to $A$1:$A$10 or move the range wherever you want in your workbook or assign another range altogether. You can modify the texts in the List range.

Read the remarks in the code. You will find the code in the code sheet of Sheet1. Note that it must be in the code sheet of the worksheet on which the ListBox is located. Also note that I assigned the name Selector to the ListBox

Make sure that Design Mode is turned off. Now, when you click on the ListBox it expands and you can select or deselect items and they will be listed in cell B8. When you click elsewhere on the sheet the ListBox contracts to a single row.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login