View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming,microsoft.public.access.formscoding
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Possible to Add Horizontal Line to Embedded Graph via VBA?

Maybe you could post the code you have so far.
Don't know about Access but id your chart has the same object model as an
Excel chart then NewSeries should work.

Try recording a macro in excel doing the same thing and see what you get.
That might be a good start.

Tim.



--
Tim Williams
Palo Alto, CA


"TimSchwaar" wrote in message
oups.com...
Hello -

We have an Access 2000 database (don't leave yet!) with a report that
is basically just an embedded (OLE) graph object. It is a simple line
graph, based on an Access pivot query, showing three lines (series)
with numerous data points.

We want to add a horizontal 'target' line to this graph so people can
see the data relative to a target. Manipulating the underlying data is
difficult only because there are quite a few similar reports, each with
complex queries. We had hoped to manipulate the graph/chart directly
from VBA by adding an additional series with our own target value as
the data.

Our problem is our inability to add a series. The Chart object,
Series, SeriesCollection, etc. don't have an Add method. An approach
I've seen in a few examples (after LOTS of Google searching) involved
the .NewSeries method but that produces an error message indicating an
unknown method.

Is our approach completely wrong? Is it even possible to add another
series to an existing chart? Thanks for any help.

Tim Schwaar