[B]Sub Archiver()
Dim nomfichier
Dim PO As String
Dim nom_client As String, num As String
With ThisWorkbook.ActiveSheet
.Copy
nom_client = .Range("B6")
num = .Range("P3")
PO = .Range("I12")[/B]
[B]chemin = "C:\Facture\" 'repertoire d'archive
nomfichier = num & "_" & nom_client & "_" & PO & ".xls"
MsgBox "Votre sauvegarde porte la référence : " & nomfichier
With ActiveWorkbook
.SaveAs Filename:=chemin & nomfichier
.Close
End With
Sheets("Invoice").Range("P3") = Left(num, 1) & Right(num, Len(num) - 1) + 1
Sheets("Invoice 2").Range("P3") = Left(num, 1) & Right(num, Len(num) - 1) + 1
Sheets("Cash sale").Range("P3") = Left(num, 1) & Right(num, Len(num) - 1) + 1
End With
With ActiveSheet
.Range("C3:E3").ClearContents
[COLOR=Red]Selection.SpecialCells(xlCellTypeConstants, 23).Select
Selection.ClearContents[/COLOR][/B]
[B] .Range("B6:I6").ClearContents
[COLOR=Red]Selection.SpecialCells(xlCellTypeConstants, 23).Select
Selection.ClearContents[/COLOR][/B]
[B] .Range("I12:M12").ClearContents
[COLOR=Red]Selection.SpecialCells(xlCellTypeConstants, 23).Select
Selection.ClearContents[/COLOR][/B]
[B] .Range("A20:O31").ClearContents
[COLOR=Red]Selection.SpecialCells(xlCellTypeConstants, 23).Select
Selection.ClearContents[/COLOR][/B]
[B] End With
ThisWorkbook.Save
End Sub
[/B]