Option Explicit
Private Sub Workbook_Open()
Dim Wsh As Worksheet, NomObj As String
For Each Wsh In Me.Worksheets
NomObj = Replace(WorksheetFunction.Proper("wsh " & Wsh.Name), " ", "")
On Error Resume Next
Wsh.[_CodeName] = NomObj
If Err Then MsgBox "L'objet Worksheet """ & Wsh.CodeName & """ ne peut être renommé """ _
& NomObj & """. ==> Err." & Err _
& vbLf & Err.Description & vbLf & "Remarque : cet objet représente la feuille """ & Wsh.Name & """."
On Error GoTo 0
Next Wsh
End Sub