Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application.DisplayAlerts = False
Cells(1, 10) = Cells(1, 10) + 1
If Cells(2, 11) > Cells(1, 11) Then Cells(1, 10) = 0
For i = 5 To 8
Sauv$ = Sauv$ & Cells(1, i)
Next i
Sauv$ = Sauv$ & format(cells(1,9),"yyyy-mm")
Sauv$ = "C:\" & Sauv$ & "-" & CStr(Format(Cells(1, 10), "000")) & ".xls"
Cells(1, 11) = Year(Date)
ThisWorkbook.SaveCopyAs (Sauv$)
Application.DisplayAlerts = True
End Sub