Sub testing
With ActiveSheet
MsgBox "x" & .CodeName & "x" & vbcr & "x" & .Name & "x"
End With
End Sub
If wsToC is the name of the sheet, like the default Sheet1, Sheet2 etc., then it is supposed to be within double quotes in the line
Sheets("wsToC").Select
The OP did already say it's the codename, not what appears on the tab.