Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 490
  • Last Modified:

excel 2010 VBA - Can't change code name of sheet (read only error)

Testing out a simple procedure and it isn't working.
I'm trying to rename the code name of a sheet (see graphic for code and error.
That property is definitely NOT read only.  I can change it manually.  Why not using code?


 rer
0
brothertruffle880
Asked:
brothertruffle880
1 Solution
 
Martin LissOlder than dirtCommented:
If the sheet is protected try unprotecting it.
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
Not everything that you can do manually can be done through code.

Just press F1 on CodeName, and if the VBA help was installed on the station, you will see that CodeName Property "Returns the code name for the object. Read-only String".

And a little further down in help, it is said that you can change it in design, but "you cannot programmatically change this property at run time."
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now