Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting Page fields in PivotTable
The below code is supposed to sort each pivotfield in
pagefield by ascending order. I am getting the error "Unbale to get the pivotfields property of the PivotTable class" What is wrong with the code? Dim PvtTable Dim CurrentPageField Set PvtTable = Worksheets("Wkly Renewals").PivotTables ("PivotTable4") For Each pvtitem In PvtTable.PageFields CurrentPageField = pvtitem.Name ActiveSheet.PivotTables("PivotTable4").PivotFields (pvtitem).AutoSort _ xlAscending, pvtitem Next |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting Page fields in PivotTable
Hey guys
Nevermind this post. I forgot to add .name to pvtitem. TOdd -----Original Message----- The below code is supposed to sort each pivotfield in pagefield by ascending order. I am getting the error "Unbale to get the pivotfields property of the PivotTable class" What is wrong with the code? Dim PvtTable Dim CurrentPageField Set PvtTable = Worksheets("Wkly Renewals").PivotTables ("PivotTable4") For Each pvtitem In PvtTable.PageFields CurrentPageField = pvtitem.Name ActiveSheet.PivotTables("PivotTable4").PivotField s (pvtitem).AutoSort _ xlAscending, pvtitem Next . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2003 PIvotTable Calculated Fields | Excel Discussion (Misc queries) | |||
Linking PivotTable Fields - Excel 2007 | Excel Discussion (Misc queries) | |||
Pivottable Sum of fields. | Excel Discussion (Misc queries) | |||
pivottable calculated fields | Excel Discussion (Misc queries) | |||
How to replace PivotTable data fields...? | Excel Programming |