SeriesCollection(2).Value writes over SeriesCollection(1).Values

Joined
Aug 11, 2017
Messages
2
Reaction score
0
Hi, I´m having trouble with my code because when the second serie is ploted it has the value of the sume of both series.

This is my code:

Dim Chart2 As ChartObject
Set Chart2 = ActiveSheet.ChartObjects.Add(Left:=10, Width:=1380, Top:=450, Height:=380)
Chart2.Chart.ChartType = xlLineStacked
Chart2.Chart.SeriesCollection.NewSeries
art2.Chart.SeriesCollection(1).Name = "Horas Realizadas(acumulado)"
Chart2.Chart.SeriesCollection(1).XValues = ActiveSheet.Range("B93:DS93")
Chart2.Chart.SeriesCollection(1).Values = ActiveSheet.Range("B95:W95")
Chart2.Chart.SeriesCollection.NewSeries
Chart2.Chart.SeriesCollection(2).Name = "CdT Actualizado (acumulado)"
Chart2.Chart.SeriesCollection(2).XValues = ActiveSheet.Range("B93:DS93")
Chart2.Chart.SeriesCollection(2).Values = ActiveSheet.Range("B99:W99")

Thank you in advance¡
 
Back
Top