Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 1.35 KB

Excel.ListObject.Name.md

File metadata and controls

57 lines (33 loc) · 1.35 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ListObject.Name property (Excel)
vbaxl10.chm734088
vbaxl10.chm734088
Excel.ListObject.Name
fbbdf2f9-6c5f-6ebe-35b1-74aab63971a4
04/30/2019
medium

ListObject.Name property (Excel)

Returns or sets a String value that represents the name of the ListObject object.

Syntax

expression.Name

expression An expression that returns a ListObject object.

Return value

String

Remarks

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.

Example

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]