ControlCollection.Item Property (String)

Gets the control with the specified name.

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

Syntax

'Declaration
ReadOnly Default Property Item ( _
    name As String _
) As Object
Object this[
    string name
] { get; }

Parameters

  • name
    Type: System.String

    The string that represents the name of the control.

Property Value

Type: System.Object
The control with the specified name.

Remarks

For controls that you add programmatically, the name parameter should contain the name that you specify as the last parameter of the Add<control> method, not the Name property of the control.

For controls that you add at design time, the name parameter should contain the identifier.

.NET Framework Security

See Also

Reference

ControlCollection Interface

Item Overload

Microsoft.Office.Tools.Excel Namespace