+ Reply to Thread
Results 1 to 3 of 3

data series doesn't show up on chart

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    Dubai
    MS-Off Ver
    Excel 2010
    Posts
    23

    data series doesn't show up on chart

    Hi,

    I have a macro that plots a bunch of graphs based on option box selections. All my graphing code is set up similar, but I'm having a problem with getting my macro to plot selected data and put in the series name.

    What happens is as follows:

    I two fuel types and two tests for each fuel type. I want to plot two graphs (one for each fuel type), each of which contains two series (for each of the tests conducted with that fuel type). The first graph does everything I want. But for the second graph, only one data series plots and the name of the series (labeled to the right) is "Series 1", not the name I referenced in my code. I think the problem has to do with my calls to "ActiveChart" but I as I'm new to VBA I don't know how to refer to a chart name when I try to add a new series to it.

    Below is my code:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I know that my graph is in the if statement for the first checkbox. But, I always graph both of these checkboxes at the same time and I don't want the plot to show up unless the checkboxes are selected.

    All suggestions are appreciated!

  2. #2
    Registered User
    Join Date
    07-03-2012
    Location
    Dubai
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: data series doesn't show up on chart

    for the second series i try to add, I also tried

    "With ActiveChart" instead of "With Charts("Chart2")" and that didn't work either

  3. #3
    Registered User
    Join Date
    07-03-2012
    Location
    Dubai
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: data series doesn't show up on chart

    fixed it.

    because it was a new chart, when i added a new series it was series 1,2,3,4....rather than the 12,13,14 I was trying to graph

    it works with activechart....but if anyone knows how to add a series to a chart by using it's name, please let me know

+ 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