Share via


ControlCollection.IndexOf Method (String)

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 (in Microsoft.Office.Tools.Excel.dll)

Syntax

'Declaration
Function IndexOf ( _
    name As String _
) As Integer
int IndexOf(
    string name
)

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 Interface

IndexOf Overload

Microsoft.Office.Tools.Excel Namespace