View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default Excel 2007 Macro specific table to generic table?

Hi Sue

Try
With
ActiveSheet.PivotTables(1).PivotFields("Sum of Duration") _
.Calculation = xlPercentOfColumn
.NumberFormat = "0%"
End With


Assuming there is only 1 pivot table on the active sheet
--
Regards
Roger Govier

"Sue" wrote in message
...
I have a statement below with "PivotTable5" - How do I make that a generic
pivot table to where it would work with any pivot highlighted?

With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Sum of Duration")
.Calculation = xlPercentOfColumn
.NumberFormat = "0%"
--
Sue