Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default remove add pivot table fields

have four pivot views, D Rank, S Rank, B Rank and O Rank. I know
how to add an items as illustrated below below, however removing it
errors when it's actually not there...how do I avoid this is my
question?

ActiveCell.FormulaR1C1 = "Data Completeness Rank"


' if the Pivot field is not showing I error out just below
ActiveSheet.PivotTables("PivotTable1").PivotFields ("S
Rank").Orientation _
= xlHidden
ActiveSheet.PivotTables("PivotTable1").PivotFields ("B Rank"). _
Orientation = xlHidden
ActiveSheet.PivotTables("PivotTable1").PivotFields ("O Rank"). _
Orientation = xlHidden


ActiveSheet.PivotTables("PivotTable1").AddDataFiel d
ActiveSheet.PivotTables( _
"PivotTable1").PivotFields("DC Rank"), "Sum of DC Rank",
xlSum
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
Looking to remove pivot fields from pivot table via macro S Himmelrich Excel Programming 0 January 16th 09 03:49 PM
fields names do not show in excel 2007 pivot table fields list marlo17 New Users to Excel 2 December 1st 08 01:25 PM
Remove grouped items and fields from pivot table Tom Harwell Excel Discussion (Misc queries) 1 February 17th 08 10:06 PM
number of fields in the row fields in pivot table UT Excel Discussion (Misc queries) 0 April 13th 06 01:17 AM
How to remove Drop Page Fields Here from Pivot Table wengyee Excel Discussion (Misc queries) 2 June 3rd 05 10:36 PM


All times are GMT +1. The time now is 12:26 PM.

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"