Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default change sheet codename

is there a command to change the codename of a sheet?

tried worksheets("Sheet1").codename = "test"

but i think the codename only retrieves values, it doesn't set them.

--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default change sheet codename

Maybe...

ThisWorkbook.VBProject.VBComponents("Sheet1").Name = "NewCodeName"

if you don't know the original codename:

dim wks as worksheet
set wks = activesheet
ThisWorkbook.VBProject.VBComponents(wks.codename). Name = "NewCodeName"

Gary Keramidas wrote:

is there a command to change the codename of a sheet?

tried worksheets("Sheet1").codename = "test"

but i think the codename only retrieves values, it doesn't set them.

--

Gary


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default change sheet codename

With ActiveSheet
.Parent.VBProject.VBComponents(.CodeName) _
.Properties("_CodeName") = "somevalue"
End With



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is there a command to change the codename of a sheet?

tried worksheets("Sheet1").codename = "test"

but i think the codename only retrieves values, it doesn't set them.

--


Gary





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default change sheet codename

thanks, dave, needed the 2nd example because i was inserting a sheet and have no
idea what name excel is assigning to it. i only have 20 sheets, but probably
because of manipulating things excel was give codenames in the 30's.


--


Gary


"Dave Peterson" wrote in message
...
Maybe...

ThisWorkbook.VBProject.VBComponents("Sheet1").Name = "NewCodeName"

if you don't know the original codename:

dim wks as worksheet
set wks = activesheet
ThisWorkbook.VBProject.VBComponents(wks.codename). Name = "NewCodeName"

Gary Keramidas wrote:

is there a command to change the codename of a sheet?

tried worksheets("Sheet1").codename = "test"

but i think the codename only retrieves values, it doesn't set them.

--

Gary


--

Dave Peterson



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default change sheet codename

thanks bob, i'll give it a try

--


Gary


"Bob Phillips" wrote in message
...
With ActiveSheet
.Parent.VBProject.VBComponents(.CodeName) _
.Properties("_CodeName") = "somevalue"
End With



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is there a command to change the codename of a sheet?

tried worksheets("Sheet1").codename = "test"

but i think the codename only retrieves values, it doesn't set them.

--


Gary







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
string to codename rk0909 Excel Discussion (Misc queries) 4 September 25th 08 10:57 PM
codename help Gary Keramidas Excel Programming 14 October 31st 05 12:32 AM
Selecting a sheet by codename Dr.Schwartz Excel Programming 3 September 3rd 04 02:15 PM
Using sheet codename problems Dustin Carter Excel Programming 1 February 20th 04 10:26 PM
Worksheet codename Andy Excel Programming 4 December 2nd 03 04:12 PM


All times are GMT +1. The time now is 04:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"