Solved

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

Posted on 2013-11-09
2
415 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 47

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

749 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