G
guy
I have tried to created a chart in a form utilizing VBE in
Excel 2000 under windows 98.
The example found in "Help" is the following:
1-Set c = ChartSpace1.Constants
2-Set ChartSpace1.DataSource = Spreadsheet1
3-ChartSpace1.Charts.Add
4-ChartSpace1.Charts(0).Type = c.chChartTypeLineMarkers
5-ChartSpace1.Charts(0).SetData c.chDimSeriesNames, 0, "b1"
6-ChartSpace1.Charts(0).SetData c.chDimCategories,
0, "a2:a28"
7-ChartSpace1.Charts(0).SeriesCollection(0).SetData
c.chDimValues, 0, "b2:b28"
However it does not work.
line 1:The ChartSpace object does not seem to support the
Constant property
line2: this statement yields an error message requesting
an Object and DataSource does not seem to be a property
(not found in the property list of the ChartSpace Object)
I manage to create the ChartSpace, the Charts(0), the
SeriesCollections, but cannot create the data series.
Does anyone has an experience with creating and linking a
chart on a form with a data list on the spreadsheet? Or
even better having the chart being updated in real time as
the data on the spreadsheet is changing?
Thanks for the help
Guy
Excel 2000 under windows 98.
The example found in "Help" is the following:
1-Set c = ChartSpace1.Constants
2-Set ChartSpace1.DataSource = Spreadsheet1
3-ChartSpace1.Charts.Add
4-ChartSpace1.Charts(0).Type = c.chChartTypeLineMarkers
5-ChartSpace1.Charts(0).SetData c.chDimSeriesNames, 0, "b1"
6-ChartSpace1.Charts(0).SetData c.chDimCategories,
0, "a2:a28"
7-ChartSpace1.Charts(0).SeriesCollection(0).SetData
c.chDimValues, 0, "b2:b28"
However it does not work.
line 1:The ChartSpace object does not seem to support the
Constant property
line2: this statement yields an error message requesting
an Object and DataSource does not seem to be a property
(not found in the property list of the ChartSpace Object)
I manage to create the ChartSpace, the Charts(0), the
SeriesCollections, but cannot create the data series.
Does anyone has an experience with creating and linking a
chart on a form with a data list on the spreadsheet? Or
even better having the chart being updated in real time as
the data on the spreadsheet is changing?
Thanks for the help
Guy