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 Cunliffe@discussions.microsoft.com> wrote in
> message news:2DFF23D2-947C-4E99-A02D-B40EFF3B07E1@microsoft.com...
> > 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
>
>
>
Bookmarks