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

Discussion in 'Coding' started by Alberto, Aug 11, 2017.

  1. Alberto

    Alberto

    Joined:
    Aug 11, 2017
    Likes Received:
    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¡
     
    Alberto, Aug 11, 2017
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. tonyck
    Replies:
    3
    Views:
    899
    silver
    Feb 20, 2006
  2. tonyck
    Replies:
    0
    Views:
    1,470
    tonyck
    Feb 22, 2006
  3. tonyck
    Replies:
    1
    Views:
    905
    dna5122
    Apr 16, 2006
  4. tonyck
    Replies:
    0
    Views:
    1,071
    tonyck
    Apr 15, 2006
  5. tonyck
    Replies:
    3
    Views:
    1,010
    Anon_F
    Jun 17, 2006
  6. tonyck
    Replies:
    0
    Views:
    874
    tonyck
    Jun 17, 2006
  7. Cache-man

    2 domains, 1 host?

    Cache-man, Sep 27, 2006, in forum: Coding
    Replies:
    2
    Views:
    996
    Scott
    Oct 29, 2006
  8. Amarok
    Replies:
    0
    Views:
    659
    Amarok
    Nov 5, 2015
Loading...