Name
pivottable
.Format(Format
)
Synopsis
Applies an autoformat to the pivot table.
Argument |
Settings |
---|---|
|
An |
The following code applies an autoformat to a pivot table on the active worksheet:
Sub ApplyAutoFormat( ) Dim pt As PivotTable ' Run CreateOLAPPivotTable to create this pivot table. Set pt = ActiveSheet.PivotTables(1) ' Apply format pt.Format xlReport1 End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.