Sheet properties

D

Dr.Schwartz

In a sheets property table there are two fields: Name and (Name). Can anybody
tell me the difference? Or direct me to the help topic describing this?

I can control the Name property (ActiveSheet.Name = "My Sheet"), but how can
I change the (Name)?

Thanks
The Doctor
 
B

Bob Phillips

Doc,

The property is the codename and is a good way of addressing a sheet in VBA
where the user might change the worksheet name.

This code shows how to change it in VBA

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


But why bother, because it is hidden from users, you don't need to.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
D

Dr.Schwartz

No, I want to control it from my code.

Richard Buttrey said:
Not sure if you're trying to do this programatically, but can't you
just go to the Properties window and change it there?

Rgds
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 
Top