Private Sub CommandButton1_Click()
On Error Resume Next
MkDir "C:\Documents and Settings\peyret\Mes documents\camille\Affaire n° " & Range("G4").Value
On Error GoTo 0
monfichier = "C:\Documents and Settings\peyret\Mes documents\camille\Affaire n° " & Range("G4").Value & "\" & "Appareil n° " & Range("C4").Value
If Dir(monfichier & ".xls") <> "" Then
jour = Format(Now, "dd-mm-yy hh mm ss")
monfichier = monfichier & " " & jour
End If
monfichier = monfichier & ".xls"
ThisWorkbook.SaveCopyAs monfichier
MsgBox "Sauvegarde terminée."
End Sub