What iv been trying to do is access legend entries on a stacked chart. I need to access the text, font and color properties of the chart legend. Iv used the following code to accomplish this task. The code executes fine, and the text property works fine, but the color and font properties are not returning correct values.
Any comments would be appreciated.
Tony
For i = .SeriesCollection.Count To 1 Step -1
With .SeriesCollection(i)
oChart.TrendLegend.SetText(i) = .Name
oChart.TrendLegend.SetColor(i) = .Color
oChart.TrendLegend.SetVisible(i) = True
oChart.TrendLegend.SetFontSize(i) = .size
ActiveChart.Legend.LegendEntries(i).Select
With Selection
Call oChart.TrendLegend.SetPosition(i, .Width, .Height, .Top, .Left)
End With
next i
Any comments would be appreciated.
Tony
For i = .SeriesCollection.Count To 1 Step -1
With .SeriesCollection(i)
oChart.TrendLegend.SetText(i) = .Name
oChart.TrendLegend.SetColor(i) = .Color
oChart.TrendLegend.SetVisible(i) = True
oChart.TrendLegend.SetFontSize(i) = .size
ActiveChart.Legend.LegendEntries(i).Select
With Selection
Call oChart.TrendLegend.SetPosition(i, .Width, .Height, .Top, .Left)
End With
next i