View Single Post
  #7   Report Post  
Jon Peltier
 
Posts: n/a
Default

This event is available if you have Excel 2002 or later. Right click on the
worksheet tab of the worksheet with the pivot table, and select View Code. This
opens the VB Editor, with the code module for the worksheet activated. Select
Worksheet from the top left dropdown, then PivotTableUpdate from the top right
dropdown. (I'm only running Excel 2000 on this laptop, so I can't verify that this
works exactly right.)

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Rav99 wrote:
Hannes, can you give me more details how to do this? I am having the same
problem... don't know how to assign that macro to the event procedure. Where
should I do it? From the pivot table, or pivot chart tab?

"Hannes" wrote:


Hi again,

I found out how to do this.

You can use an event called Worksheet_PivotTableUpdate to trigger a macro
that formats your charts.

Regards
Hannes


"Hannes" wrote:


Hello there,

I'm dealing with exactly the same problem.
I have a macro that I want to run every time that the pivot table is changed.
How can I make the pivot table run the macro when it's updated?
Anyone?

Reg. Hannes


"James" wrote:


Thanks for the info. I thought I was going to go crazy! Another fabulous
Microsoft "feature". ;)

"Debra Dalgleish" wrote:


This is a known problem with PivotCharts. There's information in the
following MSKB article, which suggests recording a macro as you apply
the formatting:

Changing a PivotChart Removes Series Formatting in Excel
http://support.microsoft.com/?id=215904


James wrote:

I have created a line chart with two Y axises based off of a pivot table.
After the chart is created I customize the text, colors and line widths the
way I want it as well as remove the pivot fields and then save it as the
default chart style. However, whenever the pivot table is refreshed it
changes the chart back to a standard line chart with only one Y axis. Is
there any way to make my chart remain the way I want it after customization
when the source pivot table is refreshed? Thanks!


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html