I’ve defined codenames for the worksheets in a workbook. The worksheet Properties window shows both the codename and user-defined sheet name .
If I leave the codename for Sheet2 unchanged but change the user-defined sheet name to “My Sheet”, in the Intermediate window entering ?sheet2.Name returns “My Sheet.” So far, so good.
However, if I change the codename to “OrigSh” and change the user-defined sheet name to “My Sheet”, entering ?OrigSh.Name in the Intermediate window returns a 424 Object error.
This discrepancy is causing my code to error. Is this an inherent with using custom codenames or do I need to change the syntax to get the sheet name associated with a custom codename or do I need to change my code?
Thanks for reading – appreciate any help.
Bookmarks