ActiveSheet CodeName Property Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a file named "ExcelToolTemplate.xls". In the file's Workbook_SheetActivate function, I have added the ff. codes
Private Sub Workbook_SheetActivate(ByVal Sh As Object
MsgBox ActiveSheet.CodeNam
MsgBox ActiveSheet.Nam
End su

Then I have an application that opens "ExcelToolTemplate.xls". When this is opened and then I add a ne
workbook. e.g. "Book1" Then if you copy one of the worksheets of "Book1" to "ExcelToolTemplate.xls" th
value of ActiveSheet.CodeName is NULL while ActiveSheet.Name has a value.
Am I missing something as to why the value of CodeName is NULL?
Please help. Thanks.
 
May I add also that the worksheet from "Book1" is added to "ExcelToolTemplate.xls" by right-clicking the sheet tab of "Book1" and click "Move or Copy...".
 
Back
Top