Assign data to chart series, using array

S

Stratuser

I'm having trouble assigning data to a chart series, using
an array. Here is my code, which bombs on the last line,
with an error saying that it can't set the Values property
of the Series class. Both mean and onestdplus are arrays.


'Build chart
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SeriesCollection.NewSeries

'Assign series values
ActiveChart.SeriesCollection(1).XValues = Range
("Dates")
ActiveChart.SeriesCollection(1).Values = Range
("Inputs")

ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = mean

ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(3).Values = onestdplus
 
S

Stratuser

I found the answer: There is a bug in Excel, described in
an article on the Microsoft website: Microsoft Knowledge
Base Article - 213653.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Bubble Chart 1
Floating Chart? 2
Excel 2007 Charting macro 1
Chart source data 3
#N/A isn't charting in VBA 2
bubble Chart bubblesize problem in VBA 3
FOR loop macro 5
No Data Lables 2

Top