Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default Hiding a pivotfield using code

Using VBA code, how would I hide the pivotfield by the
name of "Test" which located in the Data section of the
pivot table?


Set PvtTable = Worksheets("Reps Current").PivotTables
("PivotTable1")
For Each pvtfield In PvtTable.DataFields
pvtfield.Orientation = xlHidden
Next pvtfield

Thank you
Todd Huttenstine
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hiding a pivotfield using code

Remove it from the data section.

--
Regards,
Tom Ogilvy

"Todd Huttenstine" wrote in message
...
Using VBA code, how would I hide the pivotfield by the
name of "Test" which located in the Data section of the
pivot table?


Set PvtTable = Worksheets("Reps Current").PivotTables
("PivotTable1")
For Each pvtfield In PvtTable.DataFields
pvtfield.Orientation = xlHidden
Next pvtfield

Thank you
Todd Huttenstine



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
Macro to change the PivotField to sum Vick Excel Discussion (Misc queries) 3 December 21st 05 10:34 PM
Hiding Code Jae Excel Discussion (Misc queries) 3 August 10th 05 08:10 PM
PivotTable, Pivotfield selective invisible, too slow MSN Excel Programming 0 November 11th 03 10:56 AM
Hiding VBA code David Wooddall-Gainey Excel Programming 4 August 22nd 03 06:45 PM
Code for Grouping Text Values in Pivotfield Keith Young Excel Programming 1 July 17th 03 03:14 AM


All times are GMT +1. The time now is 06:43 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"