+ Reply to Thread
Results 1 to 3 of 3

Displaying XValues and Values for chart using VBA

  1. #1
    Barb Reinhardt
    Guest

    Displaying XValues and Values for chart using VBA

    Let's say I have the following

    ActiveChart.SeriesCollection(1).XValues = "B2:B20"
    ActiveChart.SeriesCollection(1).Values = "D2:D20"

    How do I go about extracting the XValues and Values so that I can display
    "B2:B20" and "D2:D20" in VBA. I've got

    xval = activechart.seriescollection(1).Xvalues

    xval is currently defined as a string. When I run, I get a run time error
    '13' Type mismatch.

    Thanks,
    Barb

    Thanks in advance.

  2. #2
    Tushar Mehta
    Guest

    Re: Displaying XValues and Values for chart using VBA

    Hi Barb,

    Like I implied in the other discussion, the only way to do this is to
    parse the SERIES formula. The link I provided to Walkenbach's code
    encapsulates the work in a class module.

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>,
    [email protected] says...
    > Let's say I have the following
    >
    > ActiveChart.SeriesCollection(1).XValues = "B2:B20"
    > ActiveChart.SeriesCollection(1).Values = "D2:D20"
    >
    > How do I go about extracting the XValues and Values so that I can display
    > "B2:B20" and "D2:D20" in VBA. I've got
    >
    > xval = activechart.seriescollection(1).Xvalues
    >
    > xval is currently defined as a string. When I run, I get a run time error
    > '13' Type mismatch.
    >
    > Thanks,
    > Barb
    >
    > Thanks in advance.
    >


  3. #3
    Barb Reinhardt
    Guest

    Re: Displaying XValues and Values for chart using VBA

    Thanks.
    "Tushar Mehta" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Barb,
    >
    > Like I implied in the other discussion, the only way to do this is to
    > parse the SERIES formula. The link I provided to Walkenbach's code
    > encapsulates the work in a class module.
    >
    > --
    > Regards,
    >
    > Tushar Mehta
    > www.tushar-mehta.com
    > Excel, PowerPoint, and VBA add-ins, tutorials
    > Custom MS Office productivity solutions
    >
    > In article <[email protected]>,
    > [email protected] says...
    >> Let's say I have the following
    >>
    >> ActiveChart.SeriesCollection(1).XValues = "B2:B20"
    >> ActiveChart.SeriesCollection(1).Values = "D2:D20"
    >>
    >> How do I go about extracting the XValues and Values so that I can display
    >> "B2:B20" and "D2:D20" in VBA. I've got
    >>
    >> xval = activechart.seriescollection(1).Xvalues
    >>
    >> xval is currently defined as a string. When I run, I get a run time
    >> error
    >> '13' Type mismatch.
    >>
    >> Thanks,
    >> Barb
    >>
    >> Thanks in advance.
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1