ListObject::Name Property

 

Gets or sets the name of the ListObject control.

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

property String^ Name {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

The name of the ListObject control.

This name is used solely as a unique identifier for the ListObjects::Item property of the Microsoft.Office.Interop.Excel::ListObjects collection. This property can only be set through the object model.

By default, each ListObject control name begins with the word "List", followed by a number (no spaces). If an attempt is made to set the Name property to a name already used by another ListObject control, an exception is thrown.

The following code example creates a ListObject in the current worksheet and then uses the Name property to set the name of the ListObject to "Employees".

This example is for a document-level customization.

No code example is currently available or this language may not be supported.
Return to top
Show: