Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign name to chart object?
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign name to chart object?
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 wrote in message oups.com... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
assign keystroke to object or button | Excel Worksheet Functions | |||
Add new worksheet and assign it to an object variable? | Excel Programming | |||
Can't assign a textbox to object | Excel Programming | |||
Can't assign a textbox to object | Excel Programming | |||
assign the sub to the object event | Excel Programming |