0 votes
in VBA by Beginner (16 points)
reshown by

Thanks for the answer, but I'm sorry, it's inappropriate because I'm just asking for the .CodeName only. You're right, the CodeName property is in principle read-only. Therefore, I ask all specialists, is there a hidden/verryhidden way to change it?

1 Answer

+2 votes
by Beginner (28 points)
selected by
Best answer

In the Visual Basic Editor, select the target sheet in the Project Explorer.

Then, change the (Name) field in the Properties Window (the first one). This is the CodeName for the sheet.

If you don't have the Project Explorer or Properties Window visible, they can both be enabled from the View menu.

by Super Expert (3.2k points)

Great answer! I'm commenting to add a link to a programmatic way of doing this with VBA.

Welcome to wellsr Q&A
wellsr Q&A is the VBA and Python programming community that rewards you for learning how to code.

Getting Started
VBA Cheat Sheets (On Sale Now)

Earn free prizes for asking VBA and Python questions and for answering questions asked by others in our community.

Looking for something else? Hire our professional VBA Help, instead.

What makes us different?
Our points system rewards you with a chance for free gifts based on the quality of your questions and answers. All you have to do is post and you could get rewarded, like these members:

ParserMonster $25 Amazon Gift Card
Hightree $10 Amazon Gift Card
Thales1 $10 Amazon Gift Card
runfunke $10 Amazon Gift Card
coolag $10 Amazon Gift Card
Siew Hun $10 Amazon Gift Card

So, why don't you join us? It really is an encouraging way to motivate members in our VBA and Python community.


For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.