View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.charting
JessK
 
Posts: n/a
Default Adding data series to chart via macro

I have a macro that adds rows of data to a summary table. I would like to
update my chart by adding a new series for each new row of data, but the
ActiveChart.SeriesCollection(N) command will not accept a variable for N.

for example, the command will add Data series # 3 with N=3, but if I create
a variable "run_num" set equal to the # of the current data series (ie,
run_num = Range("A5").Value), then the command does not work.

How can this be done so that the added series increments each time the macro
adds a new row of data?