MultiSelect Property

Applies To

DrawingObjects Collection, ListBox Object, ListBoxes Collection.

Description

Returns or sets the selection mode of the list box (or collection of list boxes). Can be one of xlNone, xlSimple, or xlExtended. Read-write.

Remarks

Single select (xlNone) allows only one item at a time to be selected. Any click or spacebar press deselects the currently selected item and selects the clicked-upon item.

Simple multi-select (xlSimple) toggles the selection on an item in the list when it is selected with the mouse or the spacebar is pressed when the focus is on the item. This mode is appropriate for pick lists where multiple items are often selected.

Extended multi-select (xlExtended) normally acts like a single-selection list box, so that mouse clicks on an item cancel all other selected items. When you hold down SHIFT while clicking the mouse or pressing an ARROW key, items are sequentially selected from the current item as the user navigates. When you hold down CTRL while clicking the mouse, single items are added to the list selection. This mode is appropriate when multiple items are allowed but not often used.

You can use the Value or ListIndex properties to get and set the selected item in a single-select list box. You must use the Selected property to get and set the selected items in a multi-select list box.

Multi-select list boxes cannot be linked to cells with the LinkedCell property.

See Also

ListIndex Property, Selected Property, Value Property.

Example

This example sets list box one on Dialog1 to allow extended multiple selections.


DialogSheets("Dialog1").ListBoxes(1).MultiSelect = xlExtended