I am looking for a way to include an automatic record button in an Excel spreadsheet. This button would automatically save a copy of the current sheet in a given directory by adding to the original file name the date and time, e.g "my_file_24102007_0830.xls"
Public Sub CommandButton1_Click()
Dim nom As String
nom = Day(Date) & "-" & Month(Date) & "-" & Year(Date) & "_" & ActiveWorkbook.Name
ActiveWorkbook.SaveCopyAs ActiveWorkbook.Path & "\" & nom
rep = MsgBox("You database has been saved : " & name, vbYes + vbInformation, "Copy of spreadsheet")