View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Pivot Data fields - removal of all (value) fields

Hi

Dim PF as PivotField
With ActiveSheet.PivotTables("Central")
For Each PF In .PivotFields
.Orientation = xlHidden
Next PF
End With

regards
Paul

ActiveSheet.PivotTables("Central").PivotFields("Su m of
FP01").Orientation = _
xlHidden


On Nov 13, 10:24*am, Bradley Searle
wrote:
Hi,

I'm trying to write a macro that removes all items in the "data" field of a
pivot table. To remove a particular field, in this case the field called "Sum
of FP01" you could use a macro such as this:

ActiveSheet.PivotTables("Central").PivotFields("Su m of FP01").Orientation = _
* * * * xlHidden

However if you do not have that field in the table it creates and error.

How would I say "remove ANY data from the data field?"

Many thanks, Brad