Insert the date an Excel Workbook was last modified.

Anonymous
2010-11-17T00:13:29+00:00

Is there a way to insert, into a cell, the date that a workbook was last modified?

Perhaps by getting the modified date from the file's properties into a cell.

Thanks in advance.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-11-17T00:29:39+00:00

Hi,

To modify a workbook you have to save it so we can use the before_save event

ALY+F11 to open vb editor. Double click 'ThisWorkbook' and paste this code in on the right. Change the sheet and range to suit

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Sheets("Sheet1").Range("A1").Value = Now

End Sub


If this post answers your question, please mark it as the Answer.

Mike H

Was this answer helpful?

100+ people found this answer helpful.
0 comments No comments

86 additional answers

Sort by: Oldest
  1. Anonymous
    2010-11-17T01:22:47+00:00

    Another way would be to use a WorksheetChangeEvent macro to cause a DateTimeCode to be written to a hidden sheet to log a change to each sheet individually........knowing only if the workbook was changed is one thing, knowing which sheet was changed in even better.

    hth

    Vaya con Dios,

    Chuck, CABGx3

    Was this answer helpful?

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2013-01-18T17:30:34+00:00

    Inserting the date a file was last saved is a pretty common need for a project team that's using the same document. I think it's not very user friendly to require programming ability to insert the date a file was last saved. I'm using Excel 2010 and see that there's a button to insert "date" on the footer. I'm not sure what "date" it's referring to but hope it's the save date.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2013-01-24T13:33:48+00:00

    MicheleR-

    Nope, it is the "Current Date", not the File Saved/Modified Date (a function that exists in MS Word).

    I really miss that capability.  I put it on all of my Word documents, in the Footer.  That way, when I look at a printout, I can compare the date on the printout with the saved/modified date on the file -- and then I KNOW that I am looking at a printout of the current saved file and not an older printout.

    This is a sorely needed function in Excel that has existed in Word for years and years.  I don't understand why MS can't put the same Insert Function capability into Excel.

    As far as I know, the only way to get the saved date is via some non-simple vba macro that must be inserted into your worksheet -- and I don't have the time or inclination to learn vba and figure out what is going on.  I really hate blindly doing things that I do not understand.

    Ron in Round Rock

    Was this answer helpful?

    0 comments No comments