D
douglascfast
Hello All,
Hope someone can answer this for me.
In the code below I was told to refresh the pivot table, yet the code
runs and the un-needed items disapear even with out the refresh.
Can someone tell me why the refresh statement is needed?
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Dim SFld As String
SFld = "Uplift month"
For Each pt In ActiveSheet.PivotTables
Set pf = pt.PivotFields(SFld)
For Each pi In pf.PivotItems
pi.Caption = pi.SourceName
Next pi
pt.RefreshTable
Next pt
End Sub
Thanks everyone
Doug
Hope someone can answer this for me.
In the code below I was told to refresh the pivot table, yet the code
runs and the un-needed items disapear even with out the refresh.
Can someone tell me why the refresh statement is needed?
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Dim SFld As String
SFld = "Uplift month"
For Each pt In ActiveSheet.PivotTables
Set pf = pt.PivotFields(SFld)
For Each pi In pf.PivotItems
pi.Caption = pi.SourceName
Next pi
pt.RefreshTable
Next pt
End Sub
Thanks everyone
Doug