Solved

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

Posted on 2013-11-09
2
405 Views
Last Modified: 2013-11-11
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
Comment
Question by:brothertruffle880
2 Comments
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39636416
If the sheet is protected try unprotecting it.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 39636435
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Copy/Clone an object. 9 18
VB.Net - Oracle BulkCopy from CSV Date Format 7 26
Name Rotation 11 30
3rd level dependant list 4 33
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now