Partager via


XmlMappedRange.Parent Property

Gets a Microsoft.Office.Interop.Excel.Worksheet that represents the worksheet containing the XmlMappedRange control.

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

Syntax

'Declaration
ReadOnly Property Parent As Object
Object Parent { get; }

Property Value

Type: System.Object
A Microsoft.Office.Interop.Excel.Worksheet that represents the worksheet containing the XmlMappedRange control.

Examples

The following code example uses the Parent property to display the name of the parent Microsoft.Office.Interop.Excel.Worksheet of an XmlMappedRange. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

Private Sub DisplayParentName()
    Dim sheet1 As Excel.Worksheet = _
        CType(Me.CustomerLastNameCell.Parent, Excel.Worksheet)
    MsgBox("The XmlMappedRange is in worksheet: " & sheet1.Name)
End Sub
private void DisplayParentName()
{
    Excel.Worksheet sheet1 = (Excel.Worksheet)this.CustomerLastNameCell.Parent;
    MessageBox.Show("The XmlMappedRange is in worksheet: " + sheet1.Name);
}

.NET Framework Security

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace