The code below attemps to read the the DEFAULT series foreground color, however reading the .forecolore property is always set to the same value (16777215) for every series regardless of how many series are present
Please comment
Tony
With oChart.TrendChart
For i = .SeriesCollection.Count To 1 Step -1
With .SeriesCollection(i).Format.Line
oChart.TrendLegend.SetColor(i) = .ForeColor' <Fails to read Default color always 16777215
.ForeColor.RGB = RGB(100 * i, 0, 0)' <Sets New Color OK
oChart.TrendLegend.SetColor(i) = .ForeColor' <Reads New Value ok
Debug.Print .ForeColor.RGB
End With
Next i
End With
Please comment
Tony
With oChart.TrendChart
For i = .SeriesCollection.Count To 1 Step -1
With .SeriesCollection(i).Format.Line
oChart.TrendLegend.SetColor(i) = .ForeColor' <Fails to read Default color always 16777215
.ForeColor.RGB = RGB(100 * i, 0, 0)' <Sets New Color OK
oChart.TrendLegend.SetColor(i) = .ForeColor' <Reads New Value ok
Debug.Print .ForeColor.RGB
End With
Next i
End With