Abstract utility objects  HandyCollection.GetItemIndex method
Given the key value of the desired item returns its numeric 1-based index.

Syntax:

index = HandyCollection.GetItemIndex(key)

IDL definition:

[id(9), helpstring("Gets index of item by its key")]
HRESULT GetItemIndex([in]VARIANT varKey, [out, retval] long* plIndex);

Parameters:

key - The key value used to find the desired item.
index - 1-based index of the serached item. If it wasn't found has value of 0.

Remarks:

Use this method to evaluate the item index in collection if you know its key.

If the item wan't found HRESULT is set to S_FALSE.

Applies to:

HandyCollection object

newObjects Copyright 2001-2006 newObjects [ ]