Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Chemin As String, Fichier As String, MonFichier As String
If ThisWorkbook.Name = "Prestations Agents.xlsm" Then
Chemin = "C:\" 'Entre le chemin de ton Archive
Fichier = "Prestations Agents " & Format(Date, "mm-yyyy") & ".xlsm"
MonFichier = Chemin & Fichier
ActiveWorkbook.SaveCopyAs Chemin & Fichier
Else
End If
End Sub
Private Sub Workbook_Open()
If Range("c3").Value = "1" Then
Range("d7:ag22").ClearContents
End If
End Sub