Legend Entry Object and the Legend Entries Collection Example

Sub FormatEachLegendEntry() Dim oChart As Chart Dim oEntry As LegendEntry Dim oEntries As LegendEntries 'Set the targe chart

Set oChart = ActiveSheet.ChartObjects("Chart 4")

.Chart

'Apply Legend oChart.HasLegend = True

'Target the leaderlines object

Set oEntries = oChart.Legend.LegendEntries

For Each oEntry In oEntries oEntry.Font.Size = 16

oEntry.Font.Colorlndex =

= 15

Next oEntry

End Sub

0 0

Post a comment