Selected Property (AListBox)

Returns or sets the selection status of an item in the list of items of the object.

Syntax

Object.Selected ( IIndex ) [ = bSelected ]

The Selected property syntax has the following parts:

 

Name

Type

Description

Object

AListBox

AListBox control

lIndex

Long

A number specifying the zero-based location of the currently selected item in the array of items in the object.

bSelected

Bool

A Boolean value indicating the selection status of the item at lIndex.

Where

bSelected can have one of the following values:

 

Value

Description

True

The list item is selected.

False *

The list item is not selected.

Comments

 The default value is FALSE.

Example

The following statement changes the AListBox List array's 8th item to be selected:

lb1.Selected(7)=True

Applies to

AListBox

See Also

List, SelCount