Sub enregistre_sous()
Application.DisplayAlerts = False
nomsave = Sheets("Feuil1").Range("L6").Value
ThisWorkbook.SaveAs (nomsave)
Application.DisplayAlerts = True
End Sub
Sub enregistre_sous()
Application.DisplayAlerts = False
nom = Sheets("Feuil1").Range("L6")
prénom = Sheets("Feuil1").Range("C8")
nomsave = nom & " " & prénom
ThisWorkbook.SaveAs (nomsave)
Application.DisplayAlerts = True
End Sub
Sub enregistre_sous()
Application.DisplayAlerts = False
nom = Sheets("Feuil1").Range("L6")
prénom = Sheets("Feuil1").Range("C8")
nomsave = nom & " " & prénom & [COLOR="Red"]".xls"[/COLOR]
ThisWorkbook.SaveAs (nomsave)
Application.DisplayAlerts = True
End Sub
Sub enregistre_sous()
Application.DisplayAlerts = False
nom = Sheets("Feuil1").Range("L6")
prénom = Sheets("Feuil1").Range("C8")
nomsave = "K:\Fax - Mail\" & nom & " " & prénom & ".xls"
ThisWorkbook.SaveAs (nomsave)
Application.DisplayAlerts = True
End Sub
Sub enregistre_sous()
Application.DisplayAlerts = False
nom = Sheets("Feuil1").Range("L6")
prénom = Sheets("Feuil1").Range("C8")
nomsave = Activeworkbook.path & "\" & nom & " " & prénom & ".xls"
ThisWorkbook.SaveAs (nomsave)
Application.DisplayAlerts = True
End Sub
If Dir(Ton_chemin_d'accès) = "" then
Application.DisplayAlerts = False
nom = Sheets("Feuil1").Range("L6")
prénom = Sheets("Feuil1").Range("C8")
nomsave = "N:\Fax - Mail\" & nom & " " & prenom & ".xls"
ThisWorkbook.SaveAs (nomsave)
Application.DisplayAlerts = True
else
Application.DisplayAlerts = False
nom = Sheets("Feuil1").Range("L6")
prénom = Sheets("Feuil1").Range("C8")
nomsave = "K:\Fax - Mail\" & nom & " " & prenom & ".xls"
ThisWorkbook.SaveAs (nomsave)
Application.DisplayAlerts = True
End if
End Sub
If Dir("K:\Fax - Mail\", [COLOR="Red"]vbdirectory) <>[/COLOR] "" then
Application.DisplayAlerts = False
nomsave = Sheets("Fax - Mail").Range("H6").Value
Name = "K:\Fax - Mail\" & nomsave & ".xls"
ThisWorkbook.SaveAs (Name)
Application.DisplayAlerts = True
else
Application.DisplayAlerts = False
nomsave = Sheets("Fax - Mail").Range("H6").Value
Name = "N:\Fax - Mail\" & nomsave & ".xls"
ThisWorkbook.SaveAs (Name)
Application.DisplayAlerts = True
end if
x = ActiveWorkbook.Path & "\"