InsertTotal Method

                  Applies To

Adds a PivotTotal object to the PivotTotals collection.

Syntax

expression.InsertTotal(Total, Before)

expression   An expression that returns a PivotDataAxis object.

Total   Required PivotTotal object. Specifies the total to be inserted.

Before   Optional Variant. Specifies the index of the total before which the inserted total will be placed. If you do not specify this argument, the total is inserted at the end of the collection.

Remarks

If the PivotTotal object is currently part of the PivotTotals collection, the object is first removed from that collection and then reinserted into it. This changes the display order because totals are displayed in their collection order.