Sub transferer()
jour = ActiveSheet.Range("A1")
NomFeuille = Format(jour, "mmmm yyyy")
If FeuilleExiste(CStr(NomFeuille)) Then
MsgBox "la feuille existe déjà"
Exit Sub
End If
ActiveWorkbook.Sheets("Synthèse").Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = NomFeuille
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End Sub
Function FeuilleExiste(NomFeuille As String) As Boolean
For Each ws In ActiveWorkbook.Sheets
If ws.Name = NomFeuille Then
FeuilleExiste = True
Exit Function
End If
Next ws
End Function