LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Multiple large .NewSeries lead to Run-time error 1004

I have the following code block, operating on a chart object named currChart,
which creates a set of series that reference cells from a worksheet object
named simulationSheet:

Dim newSeries As Series
For i = 1 To numSeries
'Create a new series
Set newSeries = currChart.SeriesCollection.NewSeries
newSeries.name = simulationSheet.Cells(1, i)
newSeries.Values =
simulationSheet.Range(simulationSheet.Cells(2, i),
simulationSheet.Cells(numDays, i))
Next i

This code works great when numDays is small, less than 60. However, if I
try to execute this code when numDays is large, say around 1600, then the
first series I create works. But the second time (when i = 2) the series is
created, and then on the next line (where it modifies the name) I get the
following error:

Run-time error €˜1004: Unable to set the Name property of the Series class

Also, if I inspect the newSeries object after it has been created, many of
its member objects (i.e. AxisGroup, ErrorBars, Formula€¦) have the value:

<Unable to get the (object type AxisGroup,ErrorBars,Formula, €¦) property of
the Series class

 
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
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Run time error '1004': Generaol ODBC error Dwaine Horton[_3_] Excel Programming 2 April 26th 05 02:52 PM
Run time error 1004 General ODCB Error Kevin Excel Programming 3 February 26th 05 12:51 PM
Application Run Time Error 1004 and Stack Error ExcelMonkey[_190_] Excel Programming 9 February 11th 05 04:48 PM


All times are GMT +1. The time now is 07:15 AM.

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

About Us

"It's about Microsoft Excel"