I have a subroutine called "SeriesColorAllocation" which assigns a client-specified list of colors to my data series objects (i.e., line, column, area) based on their position on the worksheet. The subroutine is called after the data series' chart object has been changed. The main color assignment logic is as follows:
chtActiveChart.SeriesCollection(i).Select
With SelectionIf .ChartType <> xlLine Then
.Format.Fill.ForeColor.RGB = garrColorPalette(i)
.Border.ColorIndex = xlColorIndexNone
Else
.Format.Line.ForeColor.RGB = garrColorPalette(i)
End If
End With
The "garrColorPalette" array object stores the RGB values specified by the client.
Bookmarks