Any chance you ran it twice against two different worksheets in the same
workbook?
And if I stepped through this code with F8's, it does the rename of the
codename, but if the codename got renamed (not already NewName), I got a "can't
enter break mode at this time" error message.
Andy wrote:
On previously asking for help on renaming the object name
of a worksheet I got the responce(s) below but can't get
either to work, I know the codename property is correct
as I can view the object name in a message box, I just
can't rename it. Can anyone offer me some further help.
Ta
Andy
(This one requires Extensibility library ref)
ThisWorkbook.VBProject.VBComponents.Item
(ActiveSheet.CodeName).Properties("_CodeName").Val ue
= "NewName"
or
ThisWorkbook.VBProject.VBComponents
(ActiveSheet.CodeName).Name = "NewName"
--
Dave Peterson