Hi there
I have a toggle button which switches between a bar and a line chart. However, I wish the lines in the chart to have certain settings, so I have entered the following after switching to a line chart:
ActiveChart.ChartType = xlLine
ActiveChart.SeriesCollection(1).Select
With Selection
.Format.Line.Weight = 3
.MarkerStyle = 8
.MarkerSize = 5
End With
ActiveChart.SeriesCollection(2).Select
With Selection
.Format.Line.Weight = 3
.MarkerStyle = 8
.MarkerSize = 5
End With
ActiveChart.SeriesCollection(3).Select
With Selection
.Format.Line.Weight = 3
.MarkerStyle = 8
.MarkerSize = 5
End With
Now, this is ok when there are just 3 measures/lines, but was wondering how I would go about setting this up to cater for additional measures (not sure how to write a little loop and how to apply this to the above). Unless of course there is an easier way to apply it to all lines regardless of the number?
Bookmarks