ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   referring to a chart without using its name?? (https://www.excelbanter.com/excel-programming/310268-referring-chart-without-using-its-name.html)

neowok[_75_]

referring to a chart without using its name??
 
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

--
Message posted from http://www.ExcelForum.com


Norman Jones

referring to a chart without using its 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


---
Regards,
Norman





neowok[_76_]

referring to a chart without using its name??
 
hmm sure i tried that before and it didnt work. works now anyway hehe

thanks


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 07:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com