D
douglascfast
All,
This macro was supplied by a member of the group: Debra Dalgleish
Very helpfull
Sub ResetCaptions()
'retrieve original field names
'if captions have been typed into pt
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Set pt = ActiveSheet.PivotTables(1)
For Each pf In pt.VisibleFields
For Each pi In pf.PivotItems
pi.Caption = pi.SourceName
Next pi
Next pf
pt.RefreshTable
End Sub
I need to do this for only one pivotitem for all pivot tables on the
active sheet. I dont sem to be able to get this to work though I am
sure it is simple.
Can someone help?
Doug
This macro was supplied by a member of the group: Debra Dalgleish
Very helpfull
Sub ResetCaptions()
'retrieve original field names
'if captions have been typed into pt
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Set pt = ActiveSheet.PivotTables(1)
For Each pf In pt.VisibleFields
For Each pi In pf.PivotItems
pi.Caption = pi.SourceName
Next pi
Next pf
pt.RefreshTable
End Sub
I need to do this for only one pivotitem for all pivot tables on the
active sheet. I dont sem to be able to get this to work though I am
sure it is simple.
Can someone help?
Doug