Name
pivottable
.PivotSelect(Name
, [Mode
], [UseStandardName
])
Synopsis
Selects part of a pivot table.
Argument |
Settings |
---|---|
|
The name of the field or item to select. |
|
An |
|
True uses U.S. English formats for numbers, currency, dates, and times within the |
The following code selects the rows for Essential SharePoint from the pivot table created earlier (see Figure 13-7 for an illustration of the pivot table):
Sub SelectPivotItem( ) Dim pt As PivotTable ' Run CreatePivotTable to create this pivot table. Set pt = ActiveSheet.PivotTables(1) ' Select one item. pt.PivotSelect "ProductName[Essential SharePoint]" ' This line is equivalent to preceding line: 'pt.PivotSelection = "ProductName[Essential SharePoint]" 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.