ControlCollection.IndexOf Method (String) (2007 System)

Searches for the first occurrence of a control with the specified name in the ControlCollection instance.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
Public Function IndexOf ( _
    name As String _
) As Integer
'Usage
Dim instance As ControlCollection 
Dim name As String 
Dim returnValue As Integer 

returnValue = instance.IndexOf(name)
public int IndexOf(
    string name
)
public:
int IndexOf(
    String^ name
)
public function IndexOf(
    name : String
) : int

Parameters

  • name
    Type: System.String

    The name of the control that you want to find the index of.

Return Value

Type: System.Int32
An integer that is the index of the control, or -1 if the control is not in the ControlCollection instance.

.NET Framework Security

See Also

Reference

ControlCollection Class

ControlCollection Members

IndexOf Overload

Microsoft.Office.Tools.Excel Namespace