Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 1.39 KB

Excel.ListObject.Active.md

File metadata and controls

52 lines (31 loc) · 1.39 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ListObject.Active property (Excel)
vbaxl10.chm734081
vbaxl10.chm734081
Excel.ListObject.Active
abe995da-6471-e611-ee04-d24f8518327c
04/30/2019
medium

ListObject.Active property (Excel)

Returns a Boolean value indicating whether a ListObject object on a worksheet is active—that is, whether the active cell is inside the range of the ListObject object. Read-only Boolean.

Syntax

expression.Active

expression A variable that represents a ListObject object.

Remarks

Because there is no Activate method for the ListObject object, you can activate a ListObject object only by activating a cell range within the list.

Example

The following example activates the list in the default ListObject object in the first worksheet of the active workbook. Invoking the Activate method of the Range object without cell parameters activates the entire range for the list.

Function MakeListActive() As Boolean 
 Dim wrksht As Worksheet 
 Dim objList As ListObject 
 
 Set wrksht = ActiveWorkbook.Worksheets("Sheet1") 
 Set objList = wrksht.ListObjects(1) 
 objList.Range.Activate 
 
 MakeListActive = objList.Active 
End Function

[!includeSupport and feedback]