referring to a chart without using its name??

  • Thread starter Thread starter neowok
  • Start date Start date
N

neowok

I have about 15 charts each as their own sheet i.e. its just the chart
no cells so under the vb window they are listed as Chartxx(chartname)

what I need to do is write a macro to print charts based on what day i
is. I've done that but at the moment its looking at the chart name t
print them which would cause a problem if someone changes one of th
chart names, it then wouldnt be able to find it for printing.

So I need to find out if its possible to reference the charts fo
printing by the sheet i.e. chart15.printout or something like tha
rather than the name
 
Hi Neowok,
So I need to find out if its possible to reference the charts for
printing by the sheet i.e. chart15.printout or something like that
rather than the name.

You have already correctly answered your own question, use the charts
codename.

From the intermediate window:

?Charts("Chart1").codename
Chart1

Charts("Chart1").name= "FirstChart"

?Charts("FirstChart").codename
Chart1
 
Back
Top