Okay, duplicated. It seems Excel 2007 looks for a range not only containing
the active cell, but also just touching it, when guessing what range to use.
Prior versions only used a range that the active cell was part of.
I always clear out the chart of series at the beginning anyway, or
explicitly set a data range, because you can never be sure what cell or
range is selected when the code runs:
Do Until ActiveChart.SeriesCollection = 0
ActiveChart.SeriesCollection(1).Delete
Loop
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
"MrT" wrote in message
...
Again something different (and not nice !!!) with 2007 (it's amazing how
much
is necessary to have your all code doing the same thing as with previous
versions) :
Lets take a sheet with column A empty. add text in the first 5 rows of
column B. Select A1. Then do
ActiveWorkbook.Charts.Add
This will add a chartsheet with an ugly series that you never asked for.
Do the same with the previous versions. You will have an empty chart,
waiting for your instructions to add series.
MrT