Share via


ListObject.Creator Property (2007 System)

Gets the application in which the ListObject was created.

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 Creator As XlCreator
'Usage
Dim instance As ListObject 
Dim value As XlCreator 

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

Property Value

Type: XlCreator
The application in which the ListObject was created.

Remarks

If the object was created in Microsoft Office Excel, this property returns the string XCEL, which is equivalent to the hexadecimal number 5843454C.

Examples

The following code example creates a ListObject and checks whether the creator code matches Excel. If the creator code matches, the code displays a message box.

This example is for a document-level customization.

Private Sub ListObject_Creator()
    Dim List1 As Microsoft.Office.Tools.Excel.ListObject = _
        Me.Controls.AddListObject(Me.Range("A1", "C4"), "List1")
    If List1.Creator = Excel.XlCreator.xlCreatorCode Then
        MessageBox.Show( _
            "This list object was created in Microsoft Office Excel.")
    End If 

End Sub
private void ListObject_Creator()
{
    Microsoft.Office.Tools.Excel.ListObject list1 = 
        this.Controls.AddListObject(
        this.Range["A1", "C4"], "list1");
    if (list1.Creator == Excel.XlCreator.xlCreatorCode)
    {
        MessageBox.Show("This list object was created in Microsoft Office Excel.");
    }
}

.NET Framework Security

See Also

Reference

ListObject Class

ListObject Members

Microsoft.Office.Tools.Excel Namespace