View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Todd huttenstine Todd huttenstine is offline
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