Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2003 PIvotTable Calculated Fields Kay Excel Discussion (Misc queries) 3 April 24th 10 06:41 PM
Linking PivotTable Fields - Excel 2007 Jim Excel Discussion (Misc queries) 1 August 6th 09 09:57 PM
Pivottable Sum of fields. Saviz Excel Discussion (Misc queries) 1 July 17th 08 12:10 PM
pivottable calculated fields HelpAl Excel Discussion (Misc queries) 3 December 8th 05 10:18 PM
How to replace PivotTable data fields...? Robert Stober Excel Programming 6 October 17th 03 10:00 PM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"