NamedRange.Application Property (2007 System)

Gets a Application that represents the creator of the NamedRange control.

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

[BrowsableAttribute(false)]
public Application Application { get; }

Property Value

Type: Application
A Application that represents the creator of the NamedRange control.

The following code example gets the name and version of the application that contains the NamedRange and displays the information in a message box.

This example is for a document-level customization.

private void DisplayApplicationVersion()
{
    Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
        this.Controls.AddNamedRange(this.Range["A2", "C4"],
        "namedRange1");
    string applicationVersion = namedRange1.Application.Name +
        " " + namedRange1.Application.Version;
    MessageBox.Show(applicationVersion);
}

Community Additions

ADD
Show: