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 pivotfields and refresh

I 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
Resetting PivotFields Bony Pony[_2_] Excel Programming 0 December 12th 08 07:03 PM
PivotTable - PivotFields VBA Hutch Excel Discussion (Misc queries) 0 June 18th 08 09:03 PM
PivotFields problem Tim Excel Programming 3 November 17th 05 05:33 PM
How do I refresh a PivotTable and remove outdated page field entr. NT Excel Discussion (Misc queries) 2 January 5th 05 09:39 PM
PivotFields Neal Excel Programming 2 September 20th 04 07:23 PM


All times are GMT +1. The time now is 10:25 PM.

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"