Insert latest registration date Excel

Solved
rem18 Posted messages 74 Status Member -  
 William Wallace -
Hello,

I would like to insert the date of the last save of the Excel file into a cell in an Excel sheet.
I know that I need to use a macro and VBA.
But I have absolutely no knowledge of VBA.
Could someone guide me and help me by explaining things simply?

Thank you in advance

Configuration: Windows 7 / Firefox 8.0.1

7 answers

  1. lermite222 Posted messages 9042 Status Contributor 1 199
     
    Hello,
    I don’t know if g is still online?
    If not..
    You are not on the right "sheet"
    In the project window, double click on ThisWorkbook and it’s in this window that you copy the code, but you need to specify the sheet where to save, and for that, you should put the code below..
    Private Sub Workbook_BeforeClose(Cancel As Boolean) Sheets("Feuil1").Range("A1") = Now ThisWorkbook.Save End Sub

    And there is absolutely nothing else to do.
    Close the workbook and reopen it, you will see the date and time in sheet1 cell A1
    See you later
    --
    If you bump into a pot and it sounds hollow, it’s not necessarily the pot that’s empty. ;-)(Confucius)
    NOTE: I do not respond to PMs for technical questions.
    10
    1. William Wallace
       
      Thank you soooooo! ;-)
      0