In addition to Excels' built in Statistics (under File>Properties), is there a way to insert somewhere in the workbook the date on which the file was last revised?
Thanks!
KG
In addition to Excels' built in Statistics (under File>Properties), is there a way to insert somewhere in the workbook the date on which the file was last revised?
Thanks!
KG
Hi KG,
I don't know of a formula that can do this, but you could put a workbook_beforesave event in the workbook with code like:
That will hardcode the current date into a given cell every time the file is saved. Just an idea, let me know if you need any help with this.Range("B1") = Format(Now, "mm/dd/yyyy")
Matt
what would be the complete VBA syntax to ensure that the date is only inserted upon saving the file?
Hi KG, sorry about the delay in getting back to you,
Paste the following into the ThisWorkbook object of the spreadsheet you want this in. Make sure to change the sheet name and cell address of where you want it to go. Also make sure that the cell is formatted to display the date format you want, as just the current date/time value will be entered into the cell.
MattPrivate Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Sheets("Sheet1").Range("B1") = Now End Sub
Matt: I don't see a KB entry for a "date stamp". I'd love if you could add it.
~Anne Troy
I'll add it to my list of entries to add Unfortunately I've got way too much going on the next few weeks to even think about it, but if/when I get the chance I'll add it (unless someone else does in the meantime, which would also be fine). I sometimes have a few spare minutes here and there at work, so I'll add this to the top of the list of entries to create as it won't take much time.
Pretty simple concept for an entry, I assumed something like this already existed!
I think someone did-->sheeeng
Thanks.
~Anne Troy
Still need some improvement... Need more time to do it....Originally Posted by Dreamboat
Thanks, sheeeng!!
The first KB entry is always the hardest--please don't give up.
I love your avatar!!
~Anne Troy
I forgot where I came through the avatar.. But it's cute so I used it...Originally Posted by Dreamboat
Yup, KB is really a hard thing... for beginners like me...
Thx.