Dim Nodemande As String
Dim nom As String
Dim Chemin As String
Dim FileExtStr As String
Dim FileFormatNum As Long
Dim srcWkb As String
Nodemande = ActiveSheet.Cells(2, 5).Value
nom = "Reparticiel_" & Nodemande
Chemin = ActiveSheet.Cells(3, 8).Value & "\" & ActiveSheet.Cells(6, 6).Value
With ActiveWorkbook
If Val(Application.Version) < 12 Then
' You use Excel 97-2003
FileExtStr = ".xls": FileFormatNum = -4143
Else
' You use Excel 2007-2010
FileExtStr = ".xls": FileFormatNum = 56
End If
End With
With Application
.ScreenUpdating = False
.EnableEvents = False
.DisplayAlerts = False
End With
srcWbk = ActiveWorkbook.path & "\" & ActiveWorkbook.Name
ActiveWorkbook.SaveAs Chemin & "\" & nom & FileExtStr, FileFormat:=FileFormatNum
ActiveWorkbook.SaveAs srcWbk, FileFormat:=FileFormatNum
With Application
.ScreenUpdating = True
.EnableEvents = True
.DisplayAlerts = True
End With