IndexToItemID Method

Applies To   See Also

Returns an index for a given item ID.

Syntax

[nItemID =] Control.IndexToItemID(nIndex)

Arguments

nItemID

Specifies a unique identification number.

nIndex

Specifies a number that represents the position that an item is displayed in a control.

Remarks

Each item added to a ComboBox or ListBox has two identification numbers assigned to it:

Initially, as items are added to the control, these two numbers are identical. But as items are sorted, removed, and added, these numbers are no longer identical.

Use the IndexToItemID method to return the nItemID number for a particular item in the control when you know its nIndex number.