Results 1 to 4 of 4

Thread: Best Way to append an existing series in a chart

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    42

    Best Way to append an existing series in a chart

    Hi, I am sure there are plenty of ways to do this, but I have encountered a lot of problems coding VBA lately.
    I just want to know what is the most efficient way to continue adding to an existing series on a chart. In other words append the existing series so it can plot more data. I want to do this through VBA, so just extending the chart's series range on the spreadsheet wont work. thankss!

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Best Way to append an existing series in a chart

    Doesn't the series come from the data - so you'd need to add more data to the excel 'table' area then change the charts source ranges?

    Do you have any code/example at the moment?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    42

    Re: Best Way to append an existing series in a chart

    Well, What I want to do is play around with .SeriesCollection.Values series.

    So if I say
    Code:
    Dim mySeries As Series
    mySeries = ChartObjects("Chart 1").SeriesCollection(1).Values
    
    'would like to add more data to mySeries
    How would I play around with mySeries? I can not treat it liek a string by using the string functions since it is type Series.

  4. #4

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    42

    Re: Best Way to append an existing series in a chart

    Ok I found out you can use this method from MSDN:

    Worksheets(1).ChartObjects(1).Chart. _
    SeriesCollection.Extend Worksheets(1).Range("c1:c10")

    but that probably appends the .Values property of SeriesCollection.

    How can I append the .Xvalues property also?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width