PC Review


Reply
Thread Tools Rate Thread

Assign name to chart object?

 
 
robotman@gmail.com
Guest
Posts: n/a
 
      18th Oct 2006
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 With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      18th Oct 2006
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.
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
You can't assign a value to this object object". Adan Microsoft Access 2 29th Apr 2008 05:13 PM
assign object reference to another object c_xyTopa Microsoft C# .NET 1 23rd Aug 2007 05:12 PM
Undoing Assign Macro to Object (Chart, in my case) Brad Microsoft Excel Discussion 0 1st Aug 2007 09:15 PM
Cannot Activate Chart Area in Chart. Chart Object Failed ahperez@gmail.com Microsoft Excel Programming 2 8th Aug 2006 02:38 AM
Excel chart - how to assign the file name in the chart title? =?Utf-8?B?VEdyZWVu?= Microsoft Excel Charting 1 16th Aug 2005 10:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:50 PM.