Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Pivot Chart - default chart type
I created a Pivot chart from Pivot table, however, as the user changes the
options (from pivot fields), then the chart type changes back to default one (I want the line-column 2 axes one). I figured I could go to VBA properties to default the chart type by choosing the chart code, however under that list, there is no chart code for that combination chart (line chart + column chart with 2 axes). How can I do this? Can someone help... as I am not good at VBA? Thanks! |
#2
|
|||
|
|||
If you turn on the macro recorder as you apply the custom chart type,
you'll get code similar to the following: ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, _ TypeName:="Line - Column on 2 Axes" Rav99 wrote: I created a Pivot chart from Pivot table, however, as the user changes the options (from pivot fields), then the chart type changes back to default one (I want the line-column 2 axes one). I figured I could go to VBA properties to default the chart type by choosing the chart code, however under that list, there is no chart code for that combination chart (line chart + column chart with 2 axes). How can I do this? Can someone help... as I am not good at VBA? Thanks! -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#3
|
|||
|
|||
OK... I tried.. but it doesn't work... What I did ... I open VBE and click on
the Chart, on my right, I have Chart_Activate(), so I put the script you provided underneath it and saved... but it doesn't work. Did I do something wrong? "Rav99" wrote: I created a Pivot chart from Pivot table, however, as the user changes the options (from pivot fields), then the chart type changes back to default one (I want the line-column 2 axes one). I figured I could go to VBA properties to default the chart type by choosing the chart code, however under that list, there is no chart code for that combination chart (line chart + column chart with 2 axes). How can I do this? Can someone help... as I am not good at VBA? Thanks! |
#4
|
|||
|
|||
If you put the code in the Chart_Calculate event, it should work.
Rav99 wrote: OK... I tried.. but it doesn't work... What I did ... I open VBE and click on the Chart, on my right, I have Chart_Activate(), so I put the script you provided underneath it and saved... but it doesn't work. Did I do something wrong? "Rav99" wrote: I created a Pivot chart from Pivot table, however, as the user changes the options (from pivot fields), then the chart type changes back to default one (I want the line-column 2 axes one). I figured I could go to VBA properties to default the chart type by choosing the chart code, however under that list, there is no chart code for that combination chart (line chart + column chart with 2 axes). How can I do this? Can someone help... as I am not good at VBA? Thanks! -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#5
|
|||
|
|||
yeh! Wow wow... it works...But now I have another problem of fixing the value
of my 2nd Y axis from 0 to 100%, but everytime I change the choice, it changes accordingly based on the logarithmic method. Please ... after this... I am really done with my project. Any thought? Woowww woooow ... You really make my day! "Debra Dalgleish" wrote: If you put the code in the Chart_Calculate event, it should work. Rav99 wrote: OK... I tried.. but it doesn't work... What I did ... I open VBE and click on the Chart, on my right, I have Chart_Activate(), so I put the script you provided underneath it and saved... but it doesn't work. Did I do something wrong? "Rav99" wrote: I created a Pivot chart from Pivot table, however, as the user changes the options (from pivot fields), then the chart type changes back to default one (I want the line-column 2 axes one). I figured I could go to VBA properties to default the chart type by choosing the chart code, however under that list, there is no chart code for that combination chart (line chart + column chart with 2 axes). How can I do this? Can someone help... as I am not good at VBA? Thanks! -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Setting and KEEPING the default chart | Charts and Charting in Excel | |||
How do I go from "Chart View" to "Pivot Table Form" in a Pivot ta. | Excel Discussion (Misc queries) | |||
create space in line chart between points, linked to pivot table | Charts and Charting in Excel | |||
pivot table multi line chart | Charts and Charting in Excel | |||
How do I create a custom scroll bar on a 3D Pivot Chart? | Charts and Charting in Excel |