Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
assign keystroke to object or button rufusf Excel Worksheet Functions 0 March 6th 06 09:35 AM
Add new worksheet and assign it to an object variable? Thief_ Excel Programming 2 April 4th 05 07:21 AM
Can't assign a textbox to object colin.. Excel Programming 4 December 9th 04 03:35 AM
Can't assign a textbox to object colin.. Excel Programming 0 December 8th 04 06:41 PM
assign the sub to the object event Marek Excel Programming 1 September 13th 04 08:50 PM


All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"