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)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Application As Application
'Usage
Dim instance As NamedRange 
Dim value As Application 

value = instance.Application
[BrowsableAttribute(false)]
public Application Application { get; }
[BrowsableAttribute(false)]
public:
property Application^ Application {
    Application^ get ();
}
public function get Application () : Application

Property Value

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

Examples

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 Sub DisplayApplicationVersion()
    Dim namedRange1 As Microsoft.Office.Tools.Excel.NamedRange _
        = Me.Controls.AddNamedRange(Me.Range("A2", "C4"), _
        "namedRange1")
    Dim applicationVersion As String = _
        namedRange1.Application.Name & " " & _
        namedRange1.Application.Version
    MessageBox.Show(applicationVersion)
End Sub
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);
}

.NET Framework Security

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace