Freigeben über


XmlMappedRange.Parent Property

Definition

Gets a Worksheet that represents the worksheet containing the XmlMappedRange control.

public:
 property System::Object ^ Parent { System::Object ^ get(); };
public object Parent { get; }
member this.Parent : obj
Public ReadOnly Property Parent As Object

Property Value

A 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 void DisplayParentName()
{
    Excel.Worksheet sheet1 = (Excel.Worksheet)this.CustomerLastNameCell.Parent;
    MessageBox.Show("The XmlMappedRange is in worksheet: " + sheet1.Name);
}
Private Sub DisplayParentName()
    Dim sheet1 As Excel.Worksheet = _
        CType(Me.CustomerLastNameCell.Parent, Excel.Worksheet)
    MsgBox("The XmlMappedRange is in worksheet: " & sheet1.Name)
End Sub

Applies to