When do you want the date updated when it is saved?
I understand what your are asking but I don't at the same time.
if it it when Saved put this code in the thisworkbook
if a1 is today then it should replace today with the date. It is crude but works.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Range("A1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
Ron
Have a look @ Johns site for the correct
creation date of a file;
http://www.j-walk.com/ss/excel/tips/tip57.htm
If you require help on adjusting this then post.
Ivan
Ivan/ Doughboy
Thanks for your posts, got me on the right track.
Here's what I came up with. Actually even the createdate variable is unnecessary, as all I have to do is check that the cell in the newly created file is empty and add the current date. The next time the file is opened another cell can contain today() or now() to give me the date of the update.
Ron
Public Sub test3()
Dim createdate As String
createdate = ActiveWorkbook.BuiltinDocumentProperties.Item _
("Creation date").Value
Range("b3") = "File created (first saved) on"
Range("b4") = "File updated on"
If IsEmpty(Range("c3")) Then
Range("C3").Value = Format(createdate, "dd/mm/yy")
End If
Range("c4").Value = Format(Now, "dd/mm/yy")
End Sub