This documentation is archived and is not being maintained.

Active Property [Excel 2003 VBA Language Reference]

Office 2003

Returns a Boolean value indicating whether a

Visit

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

expression.Active

expression Required. An expression that returns a

Visit

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

Visit

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


Applies to | ListObject Object


Show: