R
reynoldscm
Hi,
I am trying to reference a dynamic range in my code that modifies a
existing chart SERIES statement. However, whenever I enter the dynami
range name (i.e. rngACWP) Excel inserts the workbook file name i
addition. I have tried referencing the sheet name...which didn't work
and then tried to establish a variable that referenced th
ActiveWorkbook name but don't think I did right. So, I basically hav
two questions:
1. Is there a way to utilize some sort of variable in the SERIE
statement so that the user isn't limited to a filename that I creat
for them but dynamically pulls their filename to use in the formula?
2. If the above anwer is yes, how would I define the variable an
utilize it in the SERIES statement?
Here is the snippet of code I am working with:
ActiveSheet.ChartObjects("CUM Chart").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(3).Select
ActiveChart.SeriesCollection(3).Formula = _
"=SERIES('RangeData'!R1C4,'Automated CSPR Charts -down to
buttons.xls'!'rngDate','Automated CSPR Charts -down to
buttons.xls'!'rngACWP',3)"
Thanks for the help.
Chri
-
reynoldsc
I am trying to reference a dynamic range in my code that modifies a
existing chart SERIES statement. However, whenever I enter the dynami
range name (i.e. rngACWP) Excel inserts the workbook file name i
addition. I have tried referencing the sheet name...which didn't work
and then tried to establish a variable that referenced th
ActiveWorkbook name but don't think I did right. So, I basically hav
two questions:
1. Is there a way to utilize some sort of variable in the SERIE
statement so that the user isn't limited to a filename that I creat
for them but dynamically pulls their filename to use in the formula?
2. If the above anwer is yes, how would I define the variable an
utilize it in the SERIES statement?
Here is the snippet of code I am working with:
ActiveSheet.ChartObjects("CUM Chart").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(3).Select
ActiveChart.SeriesCollection(3).Formula = _
"=SERIES('RangeData'!R1C4,'Automated CSPR Charts -down to
buttons.xls'!'rngDate','Automated CSPR Charts -down to
buttons.xls'!'rngACWP',3)"
Thanks for the help.
Chri
-
reynoldsc