Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default change chart type on pivot refresh

I'd like to have a pivotchart which is the line on 2 axes type, but every
time I change something in the pivotchart, it changes back to its default.
Is there some code that I can have which works on any refresh/change of the
chart, which would automatically make the chart type go back to line on 2
axes?

Thanks.
--
Boris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default change chart type on pivot refresh

You could record the steps as you manually apply the chart type.
Then, add that code to the Worksheet_PivotTableUpdate event.

BorisS wrote:
I'd like to have a pivotchart which is the line on 2 axes type, but every
time I change something in the pivotchart, it changes back to its default.
Is there some code that I can have which works on any refresh/change of the
chart, which would automatically make the chart type go back to line on 2
axes?

Thanks.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default change chart type on pivot refresh

Got the basic code. What is the worksheet_pivotableupdate event, or how do I
invoke it?

Thx.
--
Boris


"Debra Dalgleish" wrote:

You could record the steps as you manually apply the chart type.
Then, add that code to the Worksheet_PivotTableUpdate event.

BorisS wrote:
I'd like to have a pivotchart which is the line on 2 axes type, but every
time I change something in the pivotchart, it changes back to its default.
Is there some code that I can have which works on any refresh/change of the
chart, which would automatically make the chart type go back to line on 2
axes?

Thanks.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default change chart type on pivot refresh

It's a worksheet event in Excel 2002 and Excel 2003.

Right-click the sheet tab on the pivot table worksheet, and choose View
Code.
From the dropdown list at the top left of the code module, choose
Worksheet.
From the dropdown list at the top right of the code module, choose
PivotTableUpdate.
Add your code to this event.

BorisS wrote:
Got the basic code. What is the worksheet_pivotableupdate event, or how do I
invoke it?

Thx.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default change chart type on pivot refresh

This is specifically for a pivotchart, for which I did find the worksheet,
and for which I found the "chart_calculate" function. Unfortunately when I
put my macro in there to update the type and color of line, and I change the
value of the chart (select a diferent page field), it seems to go in a loop
of the macro. My guess is because the change of the chart happens, it
triggers the macro, because the macro changes something (although doesn'
actually calculate, just changes colors), the macro triggers, and so on.

Thx for any further help.
--
Boris


"Debra Dalgleish" wrote:

It's a worksheet event in Excel 2002 and Excel 2003.

Right-click the sheet tab on the pivot table worksheet, and choose View
Code.
From the dropdown list at the top left of the code module, choose
Worksheet.
From the dropdown list at the top right of the code module, choose
PivotTableUpdate.
Add your code to this event.

BorisS wrote:
Got the basic code. What is the worksheet_pivotableupdate event, or how do I
invoke it?

Thx.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default change chart type on pivot refresh

You could disable events at the start of the code, and enable them at
the end:

Application.EnableEvents = False
'your code
Application.EnableEvents = True


BorisS wrote:
This is specifically for a pivotchart, for which I did find the worksheet,
and for which I found the "chart_calculate" function. Unfortunately when I
put my macro in there to update the type and color of line, and I change the
value of the chart (select a diferent page field), it seems to go in a loop
of the macro. My guess is because the change of the chart happens, it
triggers the macro, because the macro changes something (although doesn'
actually calculate, just changes colors), the macro triggers, and so on.

Thx for any further help.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

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
Pivot Chart won't refresh! srpd Charts and Charting in Excel 3 January 26th 10 03:28 PM
refresh pivot chart Souris Charts and Charting in Excel 1 January 15th 08 12:08 AM
Pivot Chart Refresh cancels all chart formatting Nico[_2_] Charts and Charting in Excel 2 September 9th 07 05:22 AM
When refreshing pivot tables my pivot table chart type changes hannah220507 Excel Discussion (Misc queries) 1 May 22nd 07 02:57 PM
Pivot Chart: cannot apply the default chart type... doco Charts and Charting in Excel 1 January 17th 05 04:55 PM


All times are GMT +1. The time now is 05:49 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"