Format Method

Microsoft Excel Visual Basic

expression.Format(Format)

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

Format   Required XlPivotFormatType. Specifies the type of report formatting to be applied to the specified PivotTable report.

XlPivotFormatType can be one of these XlPivotFormatType constants.
xlPTClassic
xlPTNone
xlReport1
xlReport10
xlReport2
xlReport3
xlReport4
xlReport5
xlReport6
xlReport7
xlReport8
xlReport9
xlTable1
xlTable10
xlTable2
xlTable3
xlTable4
xlTable5
xlTable6
xlTable7
xlTable8
xlTable9

Example

This example applies the xlReport4 indented format to the fourth PivotTable report on the active worksheet.

ActiveSheet.PivotTables("PivotTable4").Format xlReport4