Share via

Using BuiltinDocumentProperties to insert LastSavedTime into a cell

Anonymous
2011-11-30T22:07:47+00:00

In order to display the last time a workbook has been updated, i have been trying unsuccessfully to use the BuiltinDocumentProperties VBA function, but i keep getting an error. I would like the cell (C12 in my example below) to finally display the last date and time someone saved the workbook.

Here's the code i've been trying to use:

Sub Macro2()

'

' Macro2 Macro

' lastsavetime

'

Worksheets(1).Activate

Cells(C, 12).Value = ActiveWorkbook.BuiltinDocumentProperties(12)

'

End Sub

Can anybody help me with this?

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

HansV 462.6K Reputation points
2011-11-30T22:32:03+00:00

Instead of Cells(C, 12), use Range("C12") or Cells(12, "C")

Don't forget to format cell C12 as a data or as a date+time.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful