Michael
Michael

Reputation: 507

Capture Excel Pivot Table Refresh event

Is there an event corresponding to the data refresh of a pivot table? I have found the

    worksheet_pivottableupdate
event but this seems to be called everytime I change filters or manipulate the pivottable (which is quite frequently with my macros). What I need is just to capture when the underlying data is updated. Any way to do this?

Upvotes: 3

Views: 2943

Answers (1)

Khorne
Khorne

Reputation: 166

One way to tackle this is to use the pivottableupdate event, and combine it with checking that the following pivot-table property has changed.

PivotTables("PivotTable1").RefreshDate

See http://msdn.microsoft.com/en-us/library/ff834610(v=office.14).aspx for more information on the RefreshDate property.

Upvotes: 2

Related Questions