Pivot Works
Pivot Works
![]() |
No items matching your keywords were found.

How do I use Excel VBA to know when a Pivot Table has been modified?
Whenever you change a pivot table (drill down, refresh, etc) the columns get all messed up. I would like to write a macro to fix the column widths automatically, but I can't seem to figure out how to trigger an event whenever the Pivot Table is changed.
I am looking for something like an "OnChange" event, but I can't seem to get that to work.
All help is appreciated.
FWIW, looks like I need to get Excel 2003 after all.
Prior to Excel 2002 (XP), there were no events specific to pivot tables.
In those versions you have to trap the calculation event and then determine
if a change in the pivot table caused that event to fire. Excel 2002
introduces a new PivotTableUpdate event which fires only when a pivot table
changes.
--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/
