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: 1
Default New to Excel Error 1004 basic chart programming


Hi,

I've been trying to create a very basic chart with some simple values
in it. It works fine for a small quantity of values (let say 100), but
as soon as the number of values gets bigger, I get a 1004 error "Unable
to set the values property of the series class".

I've been trying to work this out for the last 2 hours and usually I'm
pretty good to programming everything else than VBA.

Here's my code:


Code:
--------------------
Private Sub Chart_Activate()
Dim iArray() As Integer
Dim iNbElements As Integer
Dim i As Integer
Dim sSeries As Series

iNbElements = 180

ReDim iArray(1 To iNbElements) As Integer

For i = 1 To iNbElements
iArray(i) = i
Next

For Each sSeries In ActiveChart.SeriesCollection
sSeries.Delete
Next

Set sSeries = ActiveChart.SeriesCollection.NewSeries

sSeries.ChartType = xlXYScatter

sSeries.Values = iArray ' *The error is here!! Making me crazy!!*

Set sSeries = Nothing

End Sub
--------------------


Please someone help me!

Nick


--
El_Pablo
------------------------------------------------------------------------
El_Pablo's Profile: http://www.excelforum.com/member.php...o&userid=33129
View this thread: http://www.excelforum.com/showthread...hreadid=529411

 
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
Chart.Export error '1004' after upgrade to Excel 2003 Marsel Excel Programming 0 December 17th 05 12:20 PM
Error 1004 when programming DataLabels.Position hturk Excel Programming 18 August 27th 05 04:40 AM
excel chart export error runtime 1004 Mau Charts and Charting in Excel 3 August 17th 05 11:35 AM
excel chart export error runtime 1004 Mau[_2_] Excel Programming 0 August 4th 05 09:53 PM
Microsoft Visual Basic Run-time error '1004' No cells were found Paul Riker Excel Programming 8 July 28th 05 05:53 AM


All times are GMT +1. The time now is 05:33 PM.

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"