Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I am trying to Change The worksheet name in a macro (NOT THE TAB NAME) is this possible Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Skid,
Try something like: '========== Sub Test2() Sheets("Sheet1").Name = "New Sheet" End Sub '<<========== --- Regards, Norman "skid" wrote in message ... Hello I am trying to Change The worksheet name in a macro (NOT THE TAB NAME) is this possible Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Skid,
I have belatedly see: "NOT THE TAB NAME", so please ignore my suggestion. However, what do you mean by changing the sheet's name? --- Regards, Norman "Norman Jones" wrote in message ... Hi Skid, Try something like: '========== Sub Test2() Sheets("Sheet1").Name = "New Sheet" End Sub '<<========== --- Regards, Norman "skid" wrote in message ... Hello I am trying to Change The worksheet name in a macro (NOT THE TAB NAME) is this possible Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is changing the wrong name propery. In the Properties pane I need to
change the (Name) property. is this possible in VB. thanks skid "Norman Jones" wrote: Hi Skid, Try something like: '========== Sub Test2() Sheets("Sheet1").Name = "New Sheet" End Sub '<<========== --- Regards, Norman "skid" wrote in message ... Hello I am trying to Change The worksheet name in a macro (NOT THE TAB NAME) is this possible Thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Skid,
A sheet's codename cannot be altered programmatically at run time; it can, of course, be changed manually from the VBE properties window. --- Regards, Norman "skid" wrote in message ... This is changing the wrong name propery. In the Properties pane I need to change the (Name) property. is this possible in VB. thanks skid "Norman Jones" wrote: Hi Skid, Try something like: '========== Sub Test2() Sheets("Sheet1").Name = "New Sheet" End Sub '<<========== --- Regards, Norman "skid" wrote in message ... Hello I am trying to Change The worksheet name in a macro (NOT THE TAB NAME) is this possible Thanks |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I just found it in another post. it's the code Name
Thanks for the help. "Norman Jones" wrote: Hi Skid, I have belatedly see: "NOT THE TAB NAME", so please ignore my suggestion. However, what do you mean by changing the sheet's name? --- Regards, Norman "Norman Jones" wrote in message ... Hi Skid, Try something like: '========== Sub Test2() Sheets("Sheet1").Name = "New Sheet" End Sub '<<========== --- Regards, Norman "skid" wrote in message ... Hello I am trying to Change The worksheet name in a macro (NOT THE TAB NAME) is this possible Thanks |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" Norman Jones wrote: Hi Skid, A sheet's codename cannot be altered programmatically at run time; it can, of course, be changed manually from the VBE properties window. --- Regards, Norman "skid" wrote in message ... This is changing the wrong name propery. In the Properties pane I need to change the (Name) property. is this possible in VB. thanks skid "Norman Jones" wrote: Hi Skid, Try something like: '========== Sub Test2() Sheets("Sheet1").Name = "New Sheet" End Sub '<<========== --- Regards, Norman "skid" wrote in message ... Hello I am trying to Change The worksheet name in a macro (NOT THE TAB NAME) is this possible Thanks -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dave,
I was overly prepared to accept the accuracy of Microsoft's help: '----------------------------- CodeName Property Returns the code name for the object. Read-only String. Note The value that you see in the cell to the right of (Name) in the Properties window is the code name of the selected object. At design time, you can change the code name of an object by changing this value. You cannot programmatically change this property at run time. .... '<<-------------------------------- Thank you for the correction and the information. --- Regards, Norman "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" Norman Jones wrote: Hi Skid, A sheet's codename cannot be altered programmatically at run time; it can, of course, be changed manually from the VBE properties window. --- Regards, Norman |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave This works GREAT!!
have a good Turkey day. "Dave Peterson" wrote: 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" Norman Jones wrote: Hi Skid, A sheet's codename cannot be altered programmatically at run time; it can, of course, be changed manually from the VBE properties window. --- Regards, Norman "skid" wrote in message ... This is changing the wrong name propery. In the Properties pane I need to change the (Name) property. is this possible in VB. thanks skid "Norman Jones" wrote: Hi Skid, Try something like: '========== Sub Test2() Sheets("Sheet1").Name = "New Sheet" End Sub '<<========== --- Regards, Norman "skid" wrote in message ... Hello I am trying to Change The worksheet name in a macro (NOT THE TAB NAME) is this possible Thanks -- Dave Peterson |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yeah, but you can't do:
wks.codename = "newcodename" (Chip Pearson was my original source, IIRC.) Norman Jones wrote: Hi Dave, I was overly prepared to accept the accuracy of Microsoft's help: '----------------------------- CodeName Property Returns the code name for the object. Read-only String. Note The value that you see in the cell to the right of (Name) in the Properties window is the code name of the selected object. At design time, you can change the code name of an object by changing this value. You cannot programmatically change this property at run time. ... '<<-------------------------------- Thank you for the correction and the information. --- Regards, Norman "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" Norman Jones wrote: Hi Skid, A sheet's codename cannot be altered programmatically at run time; it can, of course, be changed manually from the VBE properties window. --- Regards, Norman -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to change formula in shared sheet without loss of change histo | Excel Worksheet Functions | |||
Change workbook sheet reference using cell A1 to change a vairable | Excel Worksheet Functions | |||
How to record a sheet change showing row column sheet name and date? | Excel Programming | |||
How to record a sheet change showing row column sheet name and date? | Excel Programming | |||
How to record a sheet change showing row column sheet name and date? | Excel Programming |