ShowTotals Property

Microsoft Excel Visual Basic

ShowTotals Property

Gets or sets a Boolean to indicate whether the Total row is visible. Read/write Boolean.

expression.ShowTotals

expression    Required. An expression that returns ListObject object.

Example

The following code sample displays the current setting of the ShowTotals property of the default list in Sheet1 of the active workbook.

       
Sub test()   
Dim oListObj As ListObject
   
   Set wrksht = ActiveWorkbook.Worksheets("Sheet1")
   Set oListObj = wrksht.ListObjects(1)
   
   Debug.Print oListObj.ShowTotals
End Sub