Selected Property

See Also2MF8LRJ                 Example7XRNWI>Low

Applies To

File list box1M6S8UX, list boxG11UCK.


Determines the selection status of an item in a file list box or list box.  This property is an array of Boolean values with the same number of items as the ListBKCX6E property.  Not available at design time.


[form.]{ filelistbox|listbox}.Selected(index)[ = { True|False}]


The Selected property settings are:

Setting             Description


True                 The item is selected.

False                (Default) The item is not selected.



This property is particularly useful where users can make multiple selections.  You can quickly check which items in a list are selected.  You can also use this property to select or deselect items in a list from code.

If only one item is selected, you can use the ListIndex4K7KHR property to get the index1L6K9K3 of the selected item.  However, in a multiple selection, the ListIndex property returns the index of the item contained within the focus rectangle, whether or not the item is actually selected.

Data Type

IntegerDOKXHY (Boolean)

See Also


AddItem Method2BIX3OB

Clear MethodPMJHM6

List PropertyBKCX6E

ListCount Property4E91QN

ListIndex Property4K7KHR

MultiSelect PropertyYICVLQ

NewIndex PropertyIOGOXY

RemoveItem MethodM867OS

TopIndex Property2EAX0Z


Programmer's Guide:

Chapter 3, "Creating and Using Controls"