Abstract utility objects  HandyCollection.Remove method
Removes an item specified by its key.


boolean = HandyCollection.Remove(key)

IDL definition:

[id(5), helpstring("Removes an item by key")]
HRESULT Remove([in] VARIANT varKey, [out, retval] VARIANT* pvarResult);


key - Key value, identifying the item to be removed.
boolean - true if the item was found and successfuly removed, false if invalid key was used.


When you remove an item from the middle of the collection all items that were after it change their numeric index. Note that if you use ItemByIndex property or any of the other methods that take numeric indexes.

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

Applies to:

HandyCollection object

newObjects Copyright 2001-2006 newObjects [ ]