LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Series Collection Results in Runtime Error 1004

Dynamic charts made in this way are in general as rapid as VBA, since they
rely on built in Excel worksheet functions. As soon as the VBA changes the
input data, the dynamic formulas update themselves, and the chart keeps
pace.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Matthew Cunliffe" wrote in
message ...
Thanks Jon. I need to write it in code as it is part of an automated
update
to the whole workbook. The idea is that the user just presses one button,
all the data is collated and processed, then displayed in the updated
chart.
As this is likely to occur several times a day, it needs to be fairly
rapid
(although I seem to have spend half a day trying to resolve this!)
--
Matthew Cunliffe
www.euro-point.co.uk
Test Consultancy


"Jon Peltier" wrote:

You can do this without using code:

http://peltiertech.com/Excel/Charts/Dynamics.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Matthew Cunliffe" <Matthew wrote in
message ...
Hello,

I have an existing chart on a worksheet for which I am trying to update
the
XValues for each series. The update works for the first series that I
want
to change, but on the subsequent ones, it raises a Runtime Error 1004.
The
original values in each series are all valid. If I swap the series
around
(so that the second and third are before the first) then the error
occurs
immediately.

Below is a cut-down version of the code I am using. The startrow and
endrow
variables are normally populated from elsewhere.

If anyone could give me a pointer as to why it works for the first
series
but fails on all subsequent ones I would be grateful.

Set CHT = Worksheets("Chart").ChartObjects("Chart 1").Chart

startrow = 152
endrow = 196

Value1 = "='Overall Progress - Tabular'!R" & startrow & "C6:R" & endrow
&
"C6"
Value2 = "='Overall Progress - Tabular'!R" & startrow & "C8:R" & endrow
&
"C8"
Value3 = "='Overall Progress - Tabular'!R" & startrow & "C10:R" &
endrow &
"C10"

CHT.SeriesCollection("Cumulative Actual").XValues= Value1
CHT.SeriesCollection("Cumulative Predictive Failed").XValues = Value2
CHT.SeriesCollection("Cumulative Actual Failed").XValues = Value3






 
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
Runtime Error 1004 Unable to set the XValues property of series cl Rachel Excel Programming 2 April 26th 06 02:41 PM
runtime error 1004 JC[_10_] Excel Programming 3 November 4th 05 12:50 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Why I got this 1004 runtime error Rob Bovey Excel Programming 0 July 14th 04 10:26 PM
Runtime error with the sheet collection, which was not there in 20 Laks Excel Programming 1 June 18th 04 11:55 AM


All times are GMT +1. The time now is 08:33 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"