How to format a line between two points on a line chart?
Hi Mark,
I think that the question marks are only to indicate that you need to edit
that part of the code with your sheet name and chart name and then close the
double quotes. Anyway try the following but you will probably still need to
edit the sheet name and chart name and maybe even the SeriesCollection Index:-
With Worksheets("Sheet1").ChartObjects("Chart 1").Chart.SeriesCollection(1)
With .Points(4).Border 'Formats from point 3 to point 4
.ColorIndex = 3 'Red
.Weight = xlThin
'.Weight = xlThick 'code included for info
.LineStyle = xlContinuous
End With
End With
Weight and linestyle can be omitted if you don't want to change them.
Alternative method of codeing:-
With Worksheets("Sheet1").ChartObjects("Chart 1").Chart.SeriesCollection(1)
.Points(4).Border.ColorIndex = 3 'Formats from point 3 to point 4
.Points(5).Border.ColorIndex = 6 'Formats from point 4 to point 5
End With
--
Regards,
OssieMac
|