The SelectIndex method selects the list entry at the specified position. The currently selected list item is highlighted and surrounded by a dotted border. To select multiple items of a multiple selection listbox, use SetMultiList; see SetMultiList.


The only argument is:


The index (starting with 1) of the list item to be selected. If you specify 0 for this argument, the list box must not contain any selection.

Return value:

0 if an error occurred or you specified 0 for index to remove the selection.