Sub bonsave()
Dim chemin1$, chemin2$, dat As Date, f, a&, oldfich$
chemin1 = "C:\Users\PC_PAPA\Desktop\" '"C:\Users\R-D\Pictures\Trav\Trav2\"
chemin2 = "C:\Users\PC_PAPA\Desktop\XLD\" '"C:\Users\R-D\Pictures\Trav\Trav1\"
BaseName = "monfichier"
dat = Now()
' Traitement Chemin1
f = Dir(chemin1 & "monfichier*.xls*")
a = 0
Do While f <> ""
a = a + 1
fdt = CDate(FileDateTime(chemin1 & f))
If f <> ThisWorkbook.Name Then If fdt < dat Then dat = CDate(fdt): oldfich = chemin1 & f
f = Dir
Loop
If a >= 3 Then Kill oldfich
ThisWorkbook.SaveCopyAs chemin1 & BaseName & "_" & Format(Now, "dd-mm-yyyy hh""H""mm""m""ss") & ".xlsm"
' Traitement Chemin2
f = Dir(chemin2 & "monfichier*.xls*")
a = 0
Do While f <> ""
a = a + 1
fdt = CDate(FileDateTime(chemin2 & f))
If f <> ThisWorkbook.Name Then If fdt < dat Then dat = CDate(fdt): oldfich = chemin & f
f = Dir
Loop
If a >= 3 Then Kill oldfich
ThisWorkbook.SaveCopyAs chemin2 & BaseName & "_" & Format(Now, "dd-mm-yyyy hh""H""mm""m""ss") & ".xlsm"
' save current file
ActiveWorkbook.Save
Select Case MsgBox(" Les Sauvegardes sont réussies - ", , "Toutes les Sauvegardes.")
End Select
End Sub