Does anyone know the PivotTable Refresh Event?

  • Thread starter Thread starter JohnD'Elia
  • Start date Start date
J

JohnD'Elia

Does anyone know the event that happens when a PivotTable is refreshed
I have a chart that is created from a PivotTable when the use
refreshes the PivotTable I lose all my chart formatting. I'v
discovered that this is a known Microsoft issu
(http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q215904).

What I want to do is trap the refresh event and reapply my char
formatting once it is completed. I've seen an AfterRefresh event bu
that seems to only work with query data not when the user manuall
selects the refresh.

Thanks,
-John D'Eli
 
The Chart_Calculate event should work if the chart sheet is being refreshed:

'==========================
Private Sub Chart_Calculate()
With Charts("Chart1").SeriesCollection(1).Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End Sub
'====================

Or use the Pivot Update event on the sheet that contains the pivot table:
'=======================
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
With Charts("Chart1").SeriesCollection(1).Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End Sub
'=================================
 
Back
Top