1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Sub SaveCSV()
Dim rep As String
Dim Chemin As String, Fichier1 As String
Chemin = dossier_cible & "\"
Fichier1 = Range("A5").Value & "_" & Range("J1").Value & " " & Format(Date, "yyyy")
Application.DisplayAlerts = False
With ActiveWorkbook
With ActiveSheet
.Rows("1:3").Delete
.SaveAs Filename:=Chemin & Fichier1 & ".csv", FileFormat:=xlCSV, CreateBackup:=False
End With
MsgBox "Fichier sortie enregistré sous : " & dossier_cible & "\" & Fichier1
End With
Application.DisplayAlerts = True
End Sub |
Partager