April 2006
Beginner
1114 pages
98h 16m
English
pivotfield.CurrentPage [= setting]
For page fields, sets or returns the currently selected item. The following code displays ProductName as a page field, then selects one book from the list:
Sub ViewBook( )
Dim pt As PivotTable, pf As PivotField
' Uncomment this line to create pivot table.
'CreatePivotTable
' Get pivot table.
Set pt = Worksheets("BookSales").PivotTables(1)
' Get pivot field.
Set pf = pt.PivotFields("ProductName")
' Make it a page field.
pf.Orientation = xlPageField
' Select my book.
pf.CurrentPage = "Essential SharePoint"
End SubRead now
Unlock full access