ListObject.Application Property

Gets an Application that represents either the Microsoft Office Excel application or the creator of the ListObject.

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

Syntax

'Declaration
ReadOnly Property Application As Application
Application Application { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.Application
An Application that represents the creator of the ListObject.

Examples

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

This example is for a document-level customization.

Private Sub ListObject_Application()
        Dim List1 As Microsoft.Office.Tools.Excel.ListObject = _
            Me.Controls.AddListObject(Me.Range("A1", "B2"), "List1")
        Dim applicationVersion As String = List1.Application.Name & _
            " " & List1.Application.Version
        MessageBox.Show(applicationVersion)

    End Sub
private void ListObject_Application()
{
    Microsoft.Office.Tools.Excel.ListObject list1 =
        this.Controls.AddListObject(this.Range["A1", "B2"],
        "list1");
    string applicationVersion = list1.Application.Name +
        " " + list1.Application.Version;
    MessageBox.Show(applicationVersion);
}

.NET Framework Security

See Also

Reference

ListObject Interface

Microsoft.Office.Tools.Excel Namespace