Excel 2007
I'm trying to name the chart in my macro so the next time I run the macro I can delete the old chart. I use:
Charts.Add
ActiveChart.Name = "VIFreqByEng"
ActiveChart.SetSourceData Source:=UpperLeft.Offset(1, 2).Resize(NumberOfBins + 3, 1)
ActiveChart.SeriesCollection(1).XValues = UpperLeft.Offset(2, 1).Resize(NumberOfBins + 2, 1)
And so on, and *right* after this stretch of code runs I can use the immediate window to print it and I get the generic name.
Print ActiveChart.Name
StatPack Chart 28
Any idea why this is happening? There is only one thing I can think of at this point, and that is that when I set up the chart, I pull it back from its own sheet to the current "StatPack" worksheet using this:
ActiveChart.Location Where:=xlLocationAsObject, Name:="StatPack"
Is it possible that the chart moving out and back has it's name changed?
Bookmarks