Share via


ListObject.TotalsRowRange Property

Excel Developer Reference

Returns a Range representing the Total row, if any, from a specified ListObject object. Read-only.

Syntax

expression.TotalsRowRange

expression   A variable that represents a ListObject object.

Example

The following sample code returns the address of the Total row in the default list in Sheet1 of the active workbook. The code displays the Total row if it is not displayed already.

Visual Basic for Applications
  Sub DisplayTotalsRowAddress()
    Dim wrksht As Worksheet
    Dim objListObj As ListObject
    
    Set wrksht = ActiveWorkbook.Worksheets("Sheet2")
    Set objListObj = wrksht.ListObjects(1)
    objListObj.ShowTotals = True
    MsgBox objListObj.TotalsRowRange.Address
End Sub

See Also