PC Review
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
Re: Naming a chart
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
Re: Naming a chart
![]() |
Re: Naming a chart |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Lynn -
You have to hold down Shift while selecting the chart, so the resizing handles are white. This means the ChartObject (the container, or parent, for the chart) is selected; the ChartObject is the thing you need to name. Now type a new name into the Name box, and press Enter. In vba you would use this syntax: ActiveChart.Parent.Name = "MyChart" Now you refer to the ChartObject like so: ActiveSheet.ChartObjects("MyChart") and to the chart itself: ActiveSheet.ChartObjects("MyChart").Chart - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Lynn wrote: > How do I name a chart so that it may be referred to in VBA > code? The Help documentation indicates that this may be > done by selecting the chart and typing in the Name box. > This did not work for me however. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Thanks alot Jon!!
>-----Original Message----- >Lynn - > >You have to hold down Shift while selecting the chart, so the resizing >handles are white. This means the ChartObject (the container, or >parent, for the chart) is selected; the ChartObject is the thing you >need to name. Now type a new name into the Name box, and press Enter. > >In vba you would use this syntax: > >ActiveChart.Parent.Name = "MyChart" > >Now you refer to the ChartObject like so: > > ActiveSheet.ChartObjects("MyChart") > >and to the chart itself: > > ActiveSheet.ChartObjects("MyChart").Chart > >- Jon >------- >Jon Peltier, Microsoft Excel MVP >http://www.geocities.com/jonpeltier/Excel/index.html >_______ > >Lynn wrote: >> How do I name a chart so that it may be referred to in VBA >> code? The Help documentation indicates that this may be >> done by selecting the chart and typing in the Name box. >> This did not work for me however. > >. > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

