Hi,
I am trying to add a series to a chart through VB. I have problem in setting the range for the series if it is a combined range (see the code below)
Set ws5 = Worksheets("Bes tFitLine")
Set Ch5 = Charts("Chart5" )
With Ch5.SeriesColle ction.NewSeries
.Name = "Fit"
.Values = ws5.Range("C235 :C345,F6:F6")
.XValues = ws5.Range("B235 :B345,E6:E6")
End With
It only works if the range is just a one contineous range (for example ("C235:C345" ) .
What I can do if I need to pick the range as above.
Thanks
I am trying to add a series to a chart through VB. I have problem in setting the range for the series if it is a combined range (see the code below)
Set ws5 = Worksheets("Bes tFitLine")
Set Ch5 = Charts("Chart5" )
With Ch5.SeriesColle ction.NewSeries
.Name = "Fit"
.Values = ws5.Range("C235 :C345,F6:F6")
.XValues = ws5.Range("B235 :B345,E6:E6")
End With
It only works if the range is just a one contineous range (for example ("C235:C345" ) .
What I can do if I need to pick the range as above.
Thanks