Hello Rorya, I am at this point... but now I need to apply the same conditions to the lines generated from L6, L7, L8, L9, L10, ... , L15
What is the correct way? I try to change the range to (Range("L5:L15") but don't work
Private Sub CommandButton1_Click()
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.FullSeriesCollection(1).Select
With Selection.Format.Line
.Visible = msoTrue
.Transparency = 0
.Weight = 2.25
Select Case Left$(Range("L5").Value, 3)
Case "Su", "Su<"
.ForeColor.RGB = RGB(248, 255, 0)
Case "Mo", "Mo<"
.ForeColor.RGB = RGB(0, 255, 249)
Case "Me", "Me<"
.ForeColor.RGB = RGB(254, 173, 0)
Case "Ma", "Ma<"
.ForeColor.RGB = RGB(254, 0, 0)
Case "Ju", "Ju<"
.ForeColor.RGB = RGB(0, 106, 254)
Case "Ve", "Ve<"
.ForeColor.RGB = RGB(254, 0, 249)
Case "Sa", "Sa<"
.ForeColor.RGB = RGB(56, 6, 184)
Case "Ra", "Ra<"
.ForeColor.RGB = RGB(109, 21, 78)
Case "Ke", "Ke<"
.ForeColor.RGB = RGB(65, 53, 84)
Case "As", "As<"
.ForeColor.RGB = RGB(11, 216, 41)
End Select
End With
End Sub
---------------- Next, I add ActiveChart.FullSeriesCollection for 11 lines in total.
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.FullSeriesCollection(1).Select
ActiveChart.FullSeriesCollection(2).Select
ActiveChart.FullSeriesCollection(3).Select
ActiveChart.FullSeriesCollection(4).Select
ActiveChart.FullSeriesCollection(5).Select
ActiveChart.FullSeriesCollection(6).Select
ActiveChart.FullSeriesCollection(7).Select
ActiveChart.FullSeriesCollection(8).Select
ActiveChart.FullSeriesCollection(9).Select
ActiveChart.FullSeriesCollection(10).Select
and try again with (Range("L5:L15") but don't work!
Please, I need again your expertise. Thanks for your time.
Bookmarks