Public Sub CommandButton1_Click() 'SAVE ANNEXE
Dim chemin$, nom$, fichier$, FSE$, NSE$, SE$
Dim V As Integer, VM As Integer
With ThisWorkbook
    chemin = .Path & "\" 'dossier à adapter
    nom = Day(Date) & "-" & Month(Date) & "-" & Year(Date) & "_" & "PRODUIT" & "_" & Range("L4").Text & "_" & .Name
    fichier = Dir(chemin & "*.xlsm") '1er fichier du dossier
    While fichier <> ""
        FSE = Split(fichier, ".")(0)
        NSE = Split(nom, ".")(0)
        If InStr(1, FSE, NSE, vbTextCompare) <> 0 Then
            MsgBox "Utilisez le bouton [Save Version] car il existe déjà une ou plusieurs versions de cette annexe !"
            Exit Sub
        End If
        fichier = Dir 'fichier suivant
    Wend
End With
SE = Split(ThisWorkbook.Name, ".")(0)
nom = Day(Date) & "-" & Month(Date) & "-" & Year(Date) & "_" & "PRODUIT" & "_" & Range("L4").Text & "_" & SE & "_V000.xlsm"
ActiveWorkbook.SaveCopyAs ActiveWorkbook.Path & "\" & nom
REP = MsgBox("Votre base de données est sauvegardée sous le nom : " & nom, vbYes + vbInformation, "Copie sauvegarde classeur")
End Sub
Private Sub CommandButton2_Click() 'SAVE VERSION
Dim chemin$, nom$, fichier$, FSE$, NSE$
Dim V As Integer, VM As Integer
Dim Test As Boolean
With ThisWorkbook
    chemin = .Path & "\" 'dossier à adapter
    nom = Day(Date) & "-" & Month(Date) & "-" & Year(Date) & "_" & "PRODUIT" & "_" & Range("L4").Text & "_" & .Name
    fichier = Dir(chemin & "*.xlsm") '1er fichier du dossier
    While fichier <> ""
        FSE = Split(fichier, ".")(0)
        NSE = Split(nom, ".")(0)
        If InStr(1, FSE, NSE, vbTextCompare) <> 0 Then
            'On Error Resume Next
            V = CInt(Right(FSE, 3))
            If V >= VM Then VM = V
            Test = True
        End If
        fichier = Dir 'fichier suivant
    Wend
    If Test = True Then
        REP = MsgBox("Votre base de données est sauvegardée sous le nom : " & NSE & "_V" & Format(VM + 1, "000") & ".xlsm", vbYes + vbInformation, "Copie sauvegarde classeur")
        .SaveCopyAs ActiveWorkbook.Path & "\" & NSE & "_V" & Format(VM + 1, "000") & ".xlsm"
    Else
        MsgBox "Utilisez le bouton [Save Annexe] pour créer la première version !"
    End If
End With
End Sub