Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error 1004 setting xValues repeatedly

Have bumped into a problem using VBA to set xValues in bubble charts in
volume (Excel 2003 SP2 in WinXP). Have a query sheet attached to an Analysis
Services cube. From that I generate 13 bubble charts with approx 10 data
series in each. The user can rerun the query for different sets of data and
regenerate the charts. Works OK the first couple of times but eventually it
crashes with error 1004 unable to set xValues. It was stopping at different
places when I had different amounts of source data, so it was not
data-related. I was originally deleting the series and creating new ones each
time, so I tried just replacing the existing series values - made no
difference. I eventually stripped it back to a loop just resetting the
xvalues over and over again from the same source. Eventually it always
crashes. Then I stripped out everything else. All I have left is a single set
of data with one chart and one data series, no external queries or anything
else. Set up the following loop:

Dim ii As Integer
Dim jj As Integer
Dim Ser As Series
Set Ser = Worksheets("Sheet2").ChartObjects(1).Chart.SeriesC ollection(1)
For jj = 1 To 500
For ii = 1 To 25000
Ser.XValues = Worksheets("Sheet1").Range("D2")
Next ii
Next jj

and eventually it falls over (after a lot more iterations this time with all
the other memory freed up).

Does anyone know of a workaround? Advice would be much appreciated.

Cheers

Reply
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
error 1004 when setting pivottable.pagefields Amedee Van Gasse Excel Discussion (Misc queries) 0 September 24th 08 01:39 PM
Setting name of series - run-time error 1004 Masol Excel Programming 0 May 13th 07 09:31 PM
error when setting XValues for chart [email protected] Excel Programming 1 May 8th 06 05:06 AM
Runtime Error 1004 Unable to set the XValues property of series cl Rachel Excel Programming 2 April 26th 06 02:41 PM
Error 1004: Unable to set the XValues of the Series Class jonathanmiller Excel Programming 0 June 23rd 04 12:20 AM


All times are GMT +1. The time now is 02:54 PM.

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

About Us

"It's about Microsoft Excel"