Name the ChartObject, not the ChartObject.Chart.
Activechart.Parent.name = "myChart" ' if a worksheet chart
Activechart.Chartobjects(1).Name = "myChart"
manually - hold Ctrl and select the chart, type a name in the box left of
input-bar
Regards,
Peter T
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is it possible to assign a name to a chart?
>
> Here's how I create the chart (the code makes the chart to fit in a
> designated range of cells):
>
>
> ActiveSheet.ChartObjects.Add(ChartLocation.Left,
> ChartLocation.Top, ChartLocation.Width, ChartLocation.Height).Select
> ActiveChart.SeriesCollection.Add Source:=ChartXValues
>
> When I look at the ActiveChart.Name property, it is the Worksheet name
> + " Chart 1" (ex. "MyWorksheet Chart 1"). I can't figure out how to
> assign a new name to the chart. Is the .name propery read-only for
> charts?
>
> Thanks.
>
|