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.StringThe 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.