Abstract utility objects  HandyCollection.RemoveByItem method
Removes an item specified by the item itself.


boolean = HandyCollection.RemoveByItem(item)

IDL definition:

[id(6), helpstring("Removes an item by itself")]
HRESULT RemoveByItem([in] VARIANT varItem, [out, retval] VARIANT* pvarResult);


item - The object or value of the item to be removed from collection.
boolean - true if the item was found and successfuly removed, false if the item wasn't found.


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 [ ]