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: Most helpful
  1. Anonymous
    2014-09-13T16:42:12+00:00

    Hey Jim......

    Good to see you still around.

    Happy Birthday on the 19th.

    Chuck, CABGx3

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-09-13T14:48:36+00:00

    Re:  Where's "ALY+F11"?

    That is a typo and should read "Alt + F11".

    It applies to the keyboard and means press the Alt key and tap the F11 key once.

    '---

    Jim Cone

    Portland, Oregon USA

    free & commercial excel programs  (n/a xl2013)

    https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

    -or-

    http://jmp.sh/K95N3ee

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2014-09-12T18:59:00+00:00

    Where's "ALY+F11"?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-09-12T16:34:46+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

    This does not resolve the problem that Macros are perceived as Volatile and functions like SumProduct return invalid results with volatile components.  MS is still WAY BEHIND meeting users needs on this front.

    Was this answer helpful?

    0 comments No comments