LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Pivot Tables - using .AutoShow

For the benefit of others, I worked out a solution, which is to add
the DataField first, then AutoSort and AutoShow, then add the RowField
and ColumnField. My code looks like this:

Set pt = ws.PivotTables("ptTest")

With pt
.AddDataField .PivotFields("Blah"), "Sum of Blah", xlSum

With .PivotFields("CauseCatType")
.AutoSort xlDescending, "Sum of Blah"
.AutoShow xlAutomatic, xlTop, 8, "Sum of Blah"
End With

.AddFields "CauseCatType", "Category"
End With
 
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
Autoshow whole word when typing one item in the data validation bo Learning Curve Excel Worksheet Functions 1 June 16th 08 08:08 AM
Building pivot tables in Excel 2007 based on existing pivot tables? [email protected] Excel Discussion (Misc queries) 4 December 26th 07 08:05 PM
Top 10 autoshow in PivotTables watkincm Excel Discussion (Misc queries) 1 November 8th 07 06:36 AM
(Tom?) Pivot tables, code to refer to all pivot tables on template klysell Excel Programming 0 July 20th 07 09:32 PM
Pivot tables-controlling user interaction with pivot tables Sindhura Excel Programming 0 August 27th 03 02:10 PM


All times are GMT +1. The time now is 04:05 AM.

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

About Us

"It's about Microsoft Excel"