Expand Minimize

NamedRange.Parent Property

Gets the parent object of the NamedRange control.

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

Object Parent { get; }

Property Value

Type: System.Object
The parent object of the NamedRange control.

The following code example creates a NamedRange and then uses the Parent property to display the name of the parent Worksheet of the NamedRange.

This example is for a document-level customization.

Microsoft.Office.Tools.Excel.NamedRange parentNameRange;
private void DisplayParentName()
    parentNameRange = this.Controls.AddNamedRange(
         this.Range["B2"], "parentNameRange");
    Excel.Worksheet parentSheet = 
    MessageBox.Show("The NamedRange is in worksheet: " + 

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft