|
|
In a macro, when you select at object a name that appears is similar to "Chart 1", I need to know where this is stored so I can select the object without using a name, or I need to know how to change the name so I can use a name I give it to select it. The object.count method doesn't work for activating the last created object, it just tells you how many you have on current sheet.
Code:
With ActiveSheet .ChartObjects(.ChartObjects.Count).Select
End Withworks for me.
This will return the name of the last created chart.
Code:
Dim chartName as string
With ActiveSheet chartName = .ChartObjects(.ChartObjects.Count).name
End With |
|