View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default ChartObjects Macro excel2000

To manually change the name of a chartobject on a worksheet you need to
select the chart whilst holding the SHIFT key. When done correctly the
sizing handles around the chart will be white circles instead of black
squares. You should now see the chart name in the Name Box (next to the
formula bar). You can use the Name Box to edit the chart name.

The following code is what the macro recorder produces.

'Macro generated code
ActiveSheet.Shapes("Chart 1").Select
Selection.Name = "MyChart"

Cheers
Andy

רוז×*ט wrote:
hi Andy
your code dosnt work
i tried to tape a macro that gives name to the
existing chart bat ther is no option to choos

anything else?
rozent

"Andy Pope" wrote:


Hi,

If the chart is an object on a worksheet then try

Activechart.parent.name = "XXX"

Cheers
Andy

רוז×*ט wrote:

the user operate a macro to build a chart, and the chart has an automatic
number
from the excel not from the user.
after a while the user want to deleat this chart by another macro
but the macro dont identify the chart
i want to add a line in the first macro that will give a name to the chart
it built

I Tried ActiveChart.Name = "XXX"
but it didnt work

i apriciet your help
rozent


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info