1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Sub sauvegarde_fichier_csv()
rep_sauv = "E:\fic_csv"
nomfic = activeworbook.name
if instr ( nomfic , ".xls" ) > 0 then
nomfic_csv = mid ( nomfic , instr ( nomfic , ".xls" ) -1 , len ( nomfic) - 3) & "csv"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=rep_sauv & nomfic_csv , _
FileFormat:=xlCSV, CreateBackup:=False
Application.DisplayAlerts = True
else
msgbox " le fichier actif n'est pas un fichier avec extension .xls , pas de traitement effectué"
end if
End Sub |
Partager