S
stendahl_jones
Hi I want to write the Range for a chart dynamically. My code now is:
Range(rng1.Address, rng1.Offset(i, j).Address).Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Indata").Range("rng1.Address :
rng1.Offset(i, 0).Address , rng2.Address:rng2.Offset(i,0).Address"),
PlotBy:=xlColumns
but is assume that it is the .Range(......) that is wrong. I get error
'1004' and the text 'the method Range in the object Global failed. referring
to the first Range(..). but i have also had trouble with the second one. How
do you write it the way it should? Pls any help wanted!
Range(rng1.Address, rng1.Offset(i, j).Address).Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Indata").Range("rng1.Address :
rng1.Offset(i, 0).Address , rng2.Address:rng2.Offset(i,0).Address"),
PlotBy:=xlColumns
but is assume that it is the .Range(......) that is wrong. I get error
'1004' and the text 'the method Range in the object Global failed. referring
to the first Range(..). but i have also had trouble with the second one. How
do you write it the way it should? Pls any help wanted!