Active Property

Microsoft Office Web Components Visual Basic

Active Property

Returns True if the row represented by the ListRow object is selected. Read/write Boolean.

expression.Active

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

Setting the Active property of a ListRow object equal to True is not reflected in the Range object returned by the Selection property. To add a row to a selected range, you must use the Select method instead.

Example

This example checks whether the specified row in the XML list is selected.

    Sub IsRowActive()

      Dim objLists
      Dim objLRows
      Dim objLRow

      Set objLists = Spreadsheet1.ActiveSheet.ListObjects
      Set objLRows = objLists.Item(1).ListRows
	
     ' Save list row information for the third row to a variable. 
      Set objLRow = objLRows.Item(3)

     ' Display whether the current row is selected. 
      If objLRow.Active Then
            MsgBox ("Row is selected.")
      Else
            MsgBox ("Row is not selected.")
      End If 

End Sub