Thread: Dynamic Charts
View Single Post
  #1   Report Post  
vrk1
 
Posts: n/a
Default Dynamic Charts

I have a 2 column data set that I need to chart. The last row of this
dataset can increase or decrease. I need the chart to reflect the values
dynamically.

For this, I am calculating the last row value in the macro and transferring
it to the variable "lr".

When I try to introduce the value of lr in the following statement and run
it, I get an error "Run-time error '1004': Method 'run' of object
'_application' failed"

activechart.setsourcedata source:=sheets(custname).range("c1:d" & lr & "),
plotby:=xlcolumns


Does anyone know how to resolve this problem?