Hi Jon,
It is a chart embeded, when I edit it I have a Workbook with 2 sheets one
called
Chart1 with the chart and an other one called Sheet1 with data.
Here is the code I'm using to access the chart.
Dim objChart As Object
Set objChart = OLE1.object.ActiveChart
With objChart
.Type = xlXYScatter
.HasTitle = True
.SeriesCollection(1).Name = "=""Serie1"""
.SeriesCollection(1).XValues = XArray1
.SeriesCollection(1).Values = YArray1
.SeriesCollection(2).Name = "=""Serie2"""
.SeriesCollection(2).XValues = XArray2
.SeriesCollection(2).Values = YArray2
.....
End with
Ben
Thanks.
"Jon Peltier" wrote:
It's not just the chart that's embedded, right? It should be a workbook with
a chart sheet visible. If there's no worksheet, you'll have to add one.
How are you addressing the chart currently?
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
"Ben" wrote in message
...
Thank you Jon,
On my VB6 form I have a chart embeded in an OLE, do you know how to access
the data sheet to dump the values using code?
Thank you.
"Jon Peltier" wrote:
You've run into the limit on the number of characters which can be used
to
describe the .values and .xvalues, which is around 253 (no, not 255 or
256).
200 values plus 199 commas is 399 characters, and that's if the values
are
all single digit.
Dump the values into a worksheet range and use this range as the chart's
source data range.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
"Ben" wrote in message
...
Hi,
I'm using a xlXYScatter chart with 3 series. When I try to assign
the Xarray with 200 values to the XValues like this:
objChart.SeriesCollection(1).XValues = Xarray
I got the following error:
Unable to set the XValues property of the Series class
I have the chart embeded in an OLE control on a VB form.
Please Help.
Thanks