R
Rachel
I would appreciate it very much if someone could please help me with the
following problem.
I have several charts that need the source data changed often. I have
created a macro that allows the user to input lot numbers and view the charts
without having to change each charts source data. Sometimes I get a runtime
error when I use the macro to change the source data of charts with a
secondary axis. The error says "Runtime error 1004: Unable to set the xvalues
of the series class." The program always stops on the line with the
secondary x axis. I don't know any other way to refer to the secondary x
axis. Sometimes it works, other times I get an error. Please see the
following example.
Sheets("Measurements").Select
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).XValues = "=Booster!R" & a & "C1:R" & b &
"C1" ActiveChart.SeriesCollection(1).Values = "=Booster!R" & a & "C3:R" & b &
"C3"
ActiveChart.SeriesCollection(2).XValues = "=Booster!R" & a & "C1:R" & b & "C1"
ActiveChart.SeriesCollection(2).Values = "=Booster!R" & a & "C6:R" & b & "C6"
ActiveChart.SeriesCollection(3).XValues = "=Booster!R" & a & "C1:R" & b & "C1"
ActiveChart.SeriesCollection(3).Values = "=Booster!R" & a & "C10:R" & b &
"C10"
Thanks
following problem.
I have several charts that need the source data changed often. I have
created a macro that allows the user to input lot numbers and view the charts
without having to change each charts source data. Sometimes I get a runtime
error when I use the macro to change the source data of charts with a
secondary axis. The error says "Runtime error 1004: Unable to set the xvalues
of the series class." The program always stops on the line with the
secondary x axis. I don't know any other way to refer to the secondary x
axis. Sometimes it works, other times I get an error. Please see the
following example.
Sheets("Measurements").Select
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).XValues = "=Booster!R" & a & "C1:R" & b &
"C1" ActiveChart.SeriesCollection(1).Values = "=Booster!R" & a & "C3:R" & b &
"C3"
ActiveChart.SeriesCollection(2).XValues = "=Booster!R" & a & "C1:R" & b & "C1"
ActiveChart.SeriesCollection(2).Values = "=Booster!R" & a & "C6:R" & b & "C6"
ActiveChart.SeriesCollection(3).XValues = "=Booster!R" & a & "C1:R" & b & "C1"
ActiveChart.SeriesCollection(3).Values = "=Booster!R" & a & "C10:R" & b &
"C10"
Thanks