I
iamnu
I used the "Record Macro" function to get the code shown below. When
I recorded the macro, the value of A1 was 392. But when I actually
ran the macro, the value of A1 was 393. As you can see, the "Record
Macro" function "hard coded" the value of 392.
How can I make this work such that the SeriesCollection is updated
with the CURRENT value of A1?
Sheets("Chart2").Select
Range("A1").Select
Selection.Copy
Sheets("Chart1").Select
ActiveChart.PlotArea.Select
Application.CutCopyMode = False
ActiveChart.SeriesCollection(1).XValues = "='Approval Index'!
R2C1:R392C1"
ActiveChart.SeriesCollection(1).Values = "='Approval Index'!
R2C5:R392C5"
ActiveChart.SeriesCollection(2).XValues = "='Approval Index'!
R2C1:R392C1"
ActiveChart.SeriesCollection(2).Values = "='Approval Index'!
R2C7:R392C7"
Sheets("Data Input").Select
Range("A13").Select
Thanks for your help...
I recorded the macro, the value of A1 was 392. But when I actually
ran the macro, the value of A1 was 393. As you can see, the "Record
Macro" function "hard coded" the value of 392.
How can I make this work such that the SeriesCollection is updated
with the CURRENT value of A1?
Sheets("Chart2").Select
Range("A1").Select
Selection.Copy
Sheets("Chart1").Select
ActiveChart.PlotArea.Select
Application.CutCopyMode = False
ActiveChart.SeriesCollection(1).XValues = "='Approval Index'!
R2C1:R392C1"
ActiveChart.SeriesCollection(1).Values = "='Approval Index'!
R2C5:R392C5"
ActiveChart.SeriesCollection(2).XValues = "='Approval Index'!
R2C1:R392C1"
ActiveChart.SeriesCollection(2).Values = "='Approval Index'!
R2C7:R392C7"
Sheets("Data Input").Select
Range("A13").Select
Thanks for your help...