Solved

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

Posted on 2013-11-09
2
420 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: 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.

Question has a verified solution.

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

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 …
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.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

734 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