It could be that using dummy series and formula is a better approach. Hard to tell with such a contrived example and no explanation of actual usage.
Anyway here is some code.
Sub ColourChart()
Dim chtTemp As Chart
Dim objSeries As Series
Dim rngAxisLabels As Range
Dim lngIndex As Long
Set chtTemp = ActiveSheet.ChartObjects(1).Chart
Set rngAxisLabels = Range(Split(chtTemp.SeriesCollection(1).Formula, ",")(1))
Set objSeries = chtTemp.SeriesCollection(1)
lngIndex = 0
For Each rngcell In rngAxisLabels
lngIndex = lngIndex + 1
objSeries.Points(lngIndex).Format.Fill.ForeColor.RGB = rngcell.Interior.Color
Next
End Sub
I have used a very quick and dirty method of getting the range used for axis labels. In real-world usage you may need something more robust to extract the parameter.
Bookmarks