Adjust charts dynamically
Hello,
I would like to adjust dynamically a chart. In order to this, I was
hoping to be able to do something like this:
With ActiveChart.SeriesCollection.NewSeries
.Name = Sheets("Information").Range("B1")
.Values = Sheets("Data Streams").Range("e1:e200")
.XValues = Sheets("Data Streams").Range("b1:b20")
End With
which works. However, every time a new point is entered, it increases
the range. i.e. from e1:e201, etc.
I tried this:
..Values = Sheets("Data Streams").Range(cells(1,5),cells(nb,5))
where nb is defined as the number of rows with data. However, this does
not work. Any idea how I could make this?
Thanks, Nicolas
|