Leader Lines Object Example

Sub AddAndFormatLeaderLines() Dim oChart As Chart Dim oLeaderLines As LeaderLines

Set oChart = ActiveSheet.ChartObjects("Chart 1'


'Apply labels and add leaderlines With oChart.SeriesCollection(1) .ApplyDataLabels .HasLeaderLines = True End With

'Target the leaderlines object

Set oLeaderLines = oChart.SeriesCollection(1).


'Format the leaderlines With oLeaderLines

.Border.LineStyle = xlContinuous .Border.ColorIndex = 5 End With End Sub

Was this article helpful?

0 0

Post a comment