Here we picked up one old excel file with a chart generated by one lost vba dated years back.
Obviously, the following is extracted from this post is not the solution.
<code> For Each shp In sheet.Shapes
If shp.HasChart Then
Set chrt = shp.Chart
'Loop the dataseries to find the legend with the desired name.
For Each s In chrt.SeriesCollection
'If the name fits, go ahead and format the series.
If LCase(s.Name) = LCase(legendName) Then
s.Format.Fill.ForeColor.RGB = RGB(0, 176, 80) ' Green
End If
Next
End If
Next
</code>
<code> For Each shp In sheet.Shapes
If shp.HasChart Then
Set chrt = shp.Chart
'Loop the dataseries to find the legend with the desired name.
For Each s In chrt.SeriesCollection
'If the name fits, go ahead and format the series.
If LCase(s.Name) = LCase(legendName) Then
s.Format.Fill.ForeColor.RGB = RGB(0, 176, 80) ' Green
End If
Next
End If
Next
</code>
For Each shp In sheet.Shapes
If shp.HasChart Then
Set chrt = shp.Chart
'Loop the dataseries to find the legend with the desired name.
For Each s In chrt.SeriesCollection
'If the name fits, go ahead and format the series.
If LCase(s.Name) = LCase(legendName) Then
s.Format.Fill.ForeColor.RGB = RGB(0, 176, 80) ' Green
End If
Next
End If
Next
since it only changes the markers as shown here.
Has anyone used this function and remember how to set it?
Any suggestion to change the legend text color is appreciated.