Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default chart vs. chartobject

Hi,

I have different problems with the object model of charts in Excel.
Are there any good information about this object model? I only find
small examples.
I want to create an xy-chart with several lines composed of at least
three points.
Is there a way to do this point by point? My first trial makes this by
creating a range, which is made with union for each point.
I also want to add a label to some of this points. Is it possible to
do this while creating the serie? Would be easier for me.
I don't want to be bearish, but I have some other questions as well:
What happens to the chart after this line:
chChart.Location Whe=xlLocationAsObject, Name:="sheet 1"
Any attemp to access "SeriesCollection" raises an error.
Is there a possibility to create a new chart direct in a sheet - not
as an extra sheet?
And the very last question:
I want to move the chart on the sheet. For this, I trie to use the
chartobject.
But this line doesn't work:
Dim coChartObject As ChartObject
Set coChartObject = chChart.Parent

Thanks in advance,

Andreas

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default chart vs. chartobject

As soon as you change the chart from a chart sheet to an embedded chart, the
reference to the chart sheet is lost. I only use Charts.Add to make a new
chart if the chart will be a chart sheet. If I intend to embed the chart in
another sheet, I use Sheets("My Sheet").ChartObjects.Add. See here for
clues:

http://peltiertech.com/Excel/ChartsH....html#addchart

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Andreas Wendzel" wrote in message
ups.com...
Hi,

I have different problems with the object model of charts in Excel.
Are there any good information about this object model? I only find
small examples.
I want to create an xy-chart with several lines composed of at least
three points.
Is there a way to do this point by point? My first trial makes this by
creating a range, which is made with union for each point.
I also want to add a label to some of this points. Is it possible to
do this while creating the serie? Would be easier for me.
I don't want to be bearish, but I have some other questions as well:
What happens to the chart after this line:
chChart.Location Whe=xlLocationAsObject, Name:="sheet 1"
Any attemp to access "SeriesCollection" raises an error.
Is there a possibility to create a new chart direct in a sheet - not
as an extra sheet?
And the very last question:
I want to move the chart on the sheet. For this, I trie to use the
chartobject.
But this line doesn't work:
Dim coChartObject As ChartObject
Set coChartObject = chChart.Parent

Thanks in advance,

Andreas



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default chart vs. chartobject

Hi Jon,

thanks for your answer. It helps me a lot.
How can I determine which cell the source of a point in x-y diagramm
is?
I tried to use srSeries.Points() but I can't find any order in this
collection.
Thanks,

Andreas

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default chart vs. chartobject

You have to parse the series formula to discover the range containing the
data, then knowing it's the Kth point of the series, identify the Kth cell
of the range. I did this on a project a couple years back, so I could find
the routine, but it would take a while to find the backup CD. Use John
Walkenbach's chart series formula module to parse the formula:

http://www.j-walk.com/ss/excel/tips/tip83.htm

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Andreas Wendzel" wrote in message
ups.com...
Hi Jon,

thanks for your answer. It helps me a lot.
How can I determine which cell the source of a point in x-y diagramm
is?
I tried to use srSeries.Points() but I can't find any order in this
collection.
Thanks,

Andreas



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting chartobject without index no. Jaylin Charts and Charting in Excel 4 August 24th 06 04:31 PM
Passing chartobject as a parameter to sub David Cohen Excel Programming 0 September 21st 05 09:58 PM
how to set a variable to a Chart? not ChartObject Rich Excel Programming 3 June 6th 05 07:49 PM
ChartObject Name Restricion or Excel Bug Gaston Excel Programming 0 February 14th 05 05:51 PM
ChartObject index Claude Excel Programming 3 January 30th 04 09:33 PM


All times are GMT +1. The time now is 03:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"