Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
WCM WCM is offline
external usenet poster
 
Posts: 59
Default Pivot Chart VBA Reformat

Excel 2000:

If I create a pivot table and then a pivot chart based on that table, any
chart formatting I apply to the pivot chart is eliminated whenever the pivot
table is refreshed, or when the chart changes in any way.

I have written VBA code to format the pivot chart so it looks just the way I
want it to (custom chart type, font, etc.), but there appears to be no Chart
Event that will allow me to run the formatting code successfully. I tried
the Chart 'Calculate' Event, but that gets me into an infinite loop because
it seems that Excel re-calcs the pivot chart whenever parts of the chart are
selected for formatting (or when formatting is completed).

Anyone know how I can get the pivot chart to run my chart formatting code so
that the code runs one time any time the chart changes? Thanks for your help
....

Bill M.


  #2   Report Post  
Posted to microsoft.public.excel.programming
WCM WCM is offline
external usenet poster
 
Posts: 59
Default Pivot Chart VBA Reformat

One simple solution is a Global Variable - a binary 'switch' that is set to 1
when the formatting code begins execution, and back to 0 when the code is
done.

In the chart Calculate Event, the code only executes if the switch is set to
0.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicating Pivot Chart / Changing Pivot Chart data range BillG Excel Discussion (Misc queries) 4 February 25th 10 02:15 PM
How to create chart from Pivot table but not Pivot chart? Daniel Charts and Charting in Excel 1 July 31st 07 01:32 AM
When refreshing pivot tables my pivot table chart type changes hannah220507 Excel Discussion (Misc queries) 1 May 22nd 07 02:57 PM
How can I reformat an Organizational Chart? nancywancy Excel Discussion (Misc queries) 0 March 7th 06 06:30 PM
Can you reformat order of items in Pivot Tables after refresh? marmur1 Excel Discussion (Misc queries) 1 March 21st 05 01:19 PM


All times are GMT +1. The time now is 06:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"