Option Explicit
Const SavePath = "C:\Users\Toto\Documents\Archives\Comptabilité\"
Const MaFeuille = "Banque"
Sub NewYear()
Dim FullNextName, CurrentPath, ShortOldName, FullOldName, FullSavedFilename
Dim OldValue, YesNO
Dim xSheet
CurrentPath = ActiveWorkbook.Path
If Right(CurrentPath, 1) <> "\" Then CurrentPath = CurrentPath & "\"
ShortOldName = ActiveWorkbook.Name
FullOldName = CurrentPath & ActiveWorkbook.Name
FullSavedFilename = SavePath & "Compta - " & ActiveSheet.Range("C9").Value & " - " & Range("E9").Value
Workbooks.Add
Workbooks(ShortOldName).Sheets(MaFeuille).Copy Before:=ActiveWorkbook.Sheets(1)
ActiveWorkbook.ActiveSheet.Range("B10") = Now()
ActiveWorkbook.SaveAs FullSavedFilename
ActiveWorkbook.Close
Workbooks(ShortOldName).Activate
With Sheets(MaFeuille)
.Range("C9") = .Range("C9") + 1
OldValue = .Cells(.Cells(.Rows.Count, "b").End(xlUp).Row, "k")
.Range("B14") = "xxx" ' pour s'assurer que la sél. suivante n'est pas vide
.Range("B13:K" & .Rows.Count).SpecialCells(xlCellTypeConstants, 23).ClearContents
.Range("B10") = DateSerial(.Range("C4"), 10, 1)
.Range("K12") = OldValue
.Range("B10") = ""
End With
MsgBox "Traitement terminé ! "
End Sub