scottscott
Programmer
Hello,
Is there a way to determine the color of a line in an excel graph? I would like to store the color of the first line which excel picks and then plot the second line with the same color as the first line. See below:
'JV plot
With .Chart.SeriesCollection.NewSeries
y = ycol
X = xcol
.Values = Range("$" & y & "$5:$" & y & "$186")
.XValues = Range("$" & X & "$5:$" & X & "$186")
.Name = "='EXP Summary'!$A$" & 4 * i + j - 3
'cline = 'store color here
End With
'LV plot
With .Chart.SeriesCollection.NewSeries
X = xcol
zz = zcol
.Values = Range("$" & zz & "$5:$" & zz & "186")
.XValues = Range("$" & X & "$5:$" & X & "$186")
.Name = "='EXP Summary'!$A$" & 4 * i + j - 3
.Border.Color = cline 'Set color here
End With
Is there a way to determine the color of a line in an excel graph? I would like to store the color of the first line which excel picks and then plot the second line with the same color as the first line. See below:
'JV plot
With .Chart.SeriesCollection.NewSeries
y = ycol
X = xcol
.Values = Range("$" & y & "$5:$" & y & "$186")
.XValues = Range("$" & X & "$5:$" & X & "$186")
.Name = "='EXP Summary'!$A$" & 4 * i + j - 3
'cline = 'store color here
End With
'LV plot
With .Chart.SeriesCollection.NewSeries
X = xcol
zz = zcol
.Values = Range("$" & zz & "$5:$" & zz & "186")
.XValues = Range("$" & X & "$5:$" & X & "$186")
.Name = "='EXP Summary'!$A$" & 4 * i + j - 3
.Border.Color = cline 'Set color here
End With