ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referencing worksheet CODENAME in a chart object. (https://www.excelbanter.com/excel-programming/323103-referencing-worksheet-codename-chart-object.html)

Bing

Referencing worksheet CODENAME in a chart object.
 
Hi all,

I have an excel chart (generated by the Chart Wizard) that references the
worksheet NAME. For example, when i right click on chart, and select 'Source
Data' i see the 'Data Range' reference the worksheet NAME as follows:

='Main Menu'!$D$13:$D$14,'Main Menu'!$E$13:$E$14

But the 'Main Menu' worksheet has a CODE NAME of of "Main". I've tried
numerous permutations but i just cannot get this chart's Data Range to
reference the worksheet CODE NAME instead.

Can anyone help?

Thanks



Tom Ogilvy

Referencing worksheet CODENAME in a chart object.
 
It isn't designed to use the code name, so you can stop trying.

--
Regards,
Tom Ogilvy

"Bing" wrote in message
...
Hi all,

I have an excel chart (generated by the Chart Wizard) that references the
worksheet NAME. For example, when i right click on chart, and select

'Source
Data' i see the 'Data Range' reference the worksheet NAME as follows:

='Main Menu'!$D$13:$D$14,'Main Menu'!$E$13:$E$14

But the 'Main Menu' worksheet has a CODE NAME of of "Main". I've tried
numerous permutations but i just cannot get this chart's Data Range to
reference the worksheet CODE NAME instead.

Can anyone help?

Thanks





Jim Thomlinson[_3_]

Referencing worksheet CODENAME in a chart object.
 
I would not use the code name main, only because it is a reserved workd in a
lot of programming languages. The program will enter at the main procedure.
shtMain would be a better choice. That having been said try this

=shtMain.Range($D$13:$D$14), shtMain.range($E$13:$E$14)

HTH

"Bing" wrote:

Hi all,

I have an excel chart (generated by the Chart Wizard) that references the
worksheet NAME. For example, when i right click on chart, and select 'Source
Data' i see the 'Data Range' reference the worksheet NAME as follows:

='Main Menu'!$D$13:$D$14,'Main Menu'!$E$13:$E$14

But the 'Main Menu' worksheet has a CODE NAME of of "Main". I've tried
numerous permutations but i just cannot get this chart's Data Range to
reference the worksheet CODE NAME instead.

Can anyone help?

Thanks




All times are GMT +1. The time now is 04:17 PM.

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