Custom PivotChart reverts to standard type when modified
November 30, 2005 6:40 PM
Subscribe
In Excel 2002 when I create a PivotChart and apply a custom or user-defined chart type (in this instance a 2-axis line chart), the chart type reverts to a standard single-axis line chart whenever I modify one of the PivotFields. How do I prevent this?
I've changed the default chart type, but it makes no difference. Currently the solution I'm using is a piece of VBA code in the Calculate event of the chart class module, thusly:
Private Sub Chart_Calculate()
ActiveChart.ApplyCustomType _
ChartType:=xlUserDefined, _
TypeName:="Ritchie"
End Sub
The problem is that this scrap of code must be included with each and every chart, and it isn't very portable: if someone opens the workbook who doesn't have a custom chart type called "Ritchie" on their workstation the event will raise an error.
posted by Ritchie to computers & internet (3 comments total)
posted by willnot at 6:57 PM on November 30, 2005