- Add a list box to your worksheet anywhere you want it.
- Make sure that you are in control edit mode (click the symbol with the pencil and the ruler to the far left of the control toolbar- when edit mode is turned on, when you mouse over the list box, you will be able to click and drag the list box and should not be able to select any of the items within the list box)
- Right click the list box (while it is in edit mode)
- Click "properties"
- Make sure the MultiSelect Property is set to 0 - fmMultiSelectSingle
- On the ListFillRange, type in the range which you want the list box to display. For example, If you want to type in the values you want displayed in the list box in Cells A1 through A10, type A1:A10
- Set the LinkedCell property to the cell in which you want the output display. For example, if you want the output displayed in cell A11, type A11 in this box.
- Turn off the control edit mode (click the symbol with the pencil and the ruler to the far left of the control toolbar)
The above example is only useful when you allow the user to select a single item from the list box. In cases where you want the user to be able to select multiple items (as often is the case) you must use VBA. For my next post, I will provide some VBA code to output multiple selected data.
No comments:
Post a Comment