D
Dennis
2003
If I run this code is the respective w/s ThisWorkbook code window it
works fine.
ThisWorkbook.VBProject.VBComponents(wks.CodeName).Name = "Sheet2"
But if I run the code from another module I get an error 9 Subscript
not found or out of range. I did activate the worksheet in VBA prior
to running the code.
That said, I would like to change a Copied w/s Codename because it kept
the same Codename in the previous file. I would like to change the
Codename to "Sheet2" with VBA from another module.
Is this possible?
TIA EagleOne
If I run this code is the respective w/s ThisWorkbook code window it
works fine.
ThisWorkbook.VBProject.VBComponents(wks.CodeName).Name = "Sheet2"
But if I run the code from another module I get an error 9 Subscript
not found or out of range. I did activate the worksheet in VBA prior
to running the code.
That said, I would like to change a Copied w/s Codename because it kept
the same Codename in the previous file. I would like to change the
Codename to "Sheet2" with VBA from another module.
Is this possible?
TIA EagleOne