ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Inserting Change Document Date (https://www.excelbanter.com/excel-discussion-misc-queries/69569-inserting-change-document-date.html)

dhspeller

Inserting Change Document Date
 
Is there a way to insert the date a document was/is changed as opposed to the
"current" date when the document is opened?

I'd like to indicate when actual changes to a spreadsheet occured instead of
just indicating every time the document was opened.

Thanks


Dave Peterson

Inserting Change Document Date
 
Maybe you could use a little macro that runs each time someone clicks File|Save?

Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
With Me.Worksheets("sheet1").Range("A1")
.Value = Now
.NumberFormat = "mm/dd/yyyy hh:mm:ss"
End With
End Sub

This goes under the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

dhspeller wrote:

Is there a way to insert the date a document was/is changed as opposed to the
"current" date when the document is opened?

I'd like to indicate when actual changes to a spreadsheet occured instead of
just indicating every time the document was opened.

Thanks


--

Dave Peterson


All times are GMT +1. The time now is 03:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com