See Also Example
Applies To
File list box, list box
Description
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 List property. Not available at design time.
Usage
[form.]{ filelistbox|listbox}.Selected(index)[ = { True|False}]
Setting
The Selected property settings are:
Setting Description
True The item is selected.
False (Default) The item is not selected.
Remarks
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 ListIndex 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
Integer (Boolean)
Help:
AddItem Method
Clear Method
List Property
ListCount Property
ListIndex Property
MultiSelect Property
NewIndex Property
RemoveItem Method
TopIndex Property
Programmer's Guide:
Chapter 3, "Creating and Using Controls"