Sub INTER_1()
Dim Nomfichier As String
Sheets("INTER 1").Copy
With ActiveWorkbook
Nomfichier = ActiveSheet.Range("U7").Value
' .SaveAs ThisWorkbook.Path & "\" & Nomfichier, xlOpenXMLWorkbookMacroEnabled
.SaveAs ThisWorkbook.Path & "\" & Nomfichier & " " & GroupeDateHeure, xlOpenXMLWorkbookMacroEnabled 'Nb : NomFichier ne contient pas d'extension
.Close
End With
End Sub
Function GroupeDateHeure()
Dim DateDeCreation
Dim HeureEnCours As Variant
DateDeCreation = Year(Date) & "-" & Format(Month(Date), "00") & "-" & Format(Day(Date), "00")
HeureEnCours = Split(Time, ":")
GroupeDateHeure = DateDeCreation & " " & Join(HeureEnCours, "-")
End Function