Custom charts - default formatting

  • Thread starter Thread starter tomjohns
  • Start date Start date
T

tomjohns

Hi,

I am making a custom chart and hits the problem mentioned in the
article from Peltier:
http://peltiertech.com/Excel/ChartsHowTo/CreateCustomTypes.html

It says: "Another problem with a custom chart type, or any chart with
customized formatting. If a chart element with custom formatting is
removed from the chart, then added again, the custom formatting is
lost, and the element takes on the default formatting for that element
in the default chart."

Is there a smart way to solve this problem? Could the best thing to do
be some VBA-coding and to keep track on the change-event from the chart
and then reapply the custom chart type?
 
I don't know if it is the best way, but I have done it for complex charts

I set up a sheet with the name "record"
and run macros similar to

Sub tryin()
For i = 1 To SeriesCollection.Count
Sheets("record").Cells(i, 1) = CI(i)
Next i
End Sub
Sub tryout()
For i = 1 To SeriesCollection(i)
SeriesCollection(i).ColorIndex = Sheets("record").Cells(i, 1)
Next i
End Sub

needless to say these are not the full macro
 
Back
Top