Add points to an existing xy chart

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Roger Blickensderfer
    New Member
    • Aug 2008
    • 1

    Add points to an existing xy chart

    I made an embedded xy chart with ChartWizard on Excel and would now like to modify the graph with VisualBasic. I would like to plot a set of xy points individually (not all at once) so that the viewer can see a pattern traced out on the screen. The xy data are in columns on the worksheet.

    I am a novice VB programmer. I got a 1004 runtime error when I tried to activate the chart. Will I need a series formula? Should the x and y values be indexed so that they can be plotted one at a time?

    The purpose of the chart is to show orbital motion (planets, satellites, etc.) I am a science teacher. I would appreciate any help you can give me. Thanks.
  • ubentook
    New Member
    • Dec 2007
    • 58

    #2
    A chart on a worksheet is containied in a ChartObject.
    So if there is only one chart on the worksheet then the chart could be identifed using...
    Worksheets("She et1").ChartObje cts(1).Chart

    One possible way to display the series incrementally is to create the chart using all of the points, but make all of the points invisible by using no line or marker for them .
    Then add the line and marker, when needed, for each point.

    In XL2007, Microsoft changed/eliminated/added a lot of chart properties (some of which don't work), so if you have that version, my condolences.

    Comment

    Working...