Retrieves the index of a specified object in the collection, or -1 if not found.
Returns the zero-based index of the first occurrence of a Command in the CommandCollection.
Visual Basic (Usage) | Copy Code |
---|---|
|
Parameters
- value
-
The object to locate in the collection.
The command object to locate in the collection.
Return Value
The zero-based index of the first occurrence of Command within the entire CommandCollection, if found; otherwise, -1.Negative one (-1) will be returned if item is not found.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family