ListIndex Property
◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Sets or returns the index of the currently selected item in the control;
not available at design time.
[form.]ctlname.ListIndex[ = index%]
■ index% Valid settings are:
Value Description
═════════════════ ════════════════════════════════════
-1 to ListCount-1 Valid index range; an error is
generated when you try to access
an element greater than ListCount
0 Top item in list box
-1 No item selected; (all list box
controls except Directory list box)
-1 (Directory list box only) Index of
current directory path when control
is loaded at run time.
Applies To
◄Combo Box Control► ◄Directory List Box Control►
◄Drive List Box Control► ◄File List Box Control►
◄List Box Control►
See Also
◄ADDITEM Method► ◄List Property►
◄ListCount Property► ◄REMOVEITEM Method►