title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
ListObject.Name property (Excel) |
vbaxl10.chm734088 |
|
|
fbbdf2f9-6c5f-6ebe-35b1-74aab63971a4 |
04/30/2019 |
medium |
Returns or sets a String value that represents the name of the ListObject object.
expression.Name
expression An expression that returns a ListObject object.
String
This name is used solely as a unique identifier for the Item property of the ListObjects collection objects. This property can only be set through the object model.
By default, each ListObject object 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 object, a run-time error is thrown.
The following example displays the name of the default ListObject object on Sheet1 of the active workbook.
Sub Test
Dim wrksht As Worksheet
Dim oListObj As ListObject
Set wrksht = ActiveWorkbook.Worksheets("Sheet1")
Set oListObj = wrksht.ListObjects(1)
MsgBox oListObj.Name
End Sub
[!includeSupport and feedback]