I need to import the Excel file save date into a cell within the file. I
don't need the TODAY() command as that would just show me today's date. I'm
just trying to automate this field so that I don't have to change it
everytime I make a update to the file.
You could use a custom function:
Function LSDate()
LSDate = Application.Caller.Parent.Parent. _
BuiltinDocumentProperties("Last Save Time").Value
End Function
Copy the code into a codemodule of your workbook or your personal.xls. Then
it is used like:
=LSDate()
Format the cell for date/time and you're done.
HTH,
Bernie
MS Excel MVP
> I need to import the Excel file save date into a cell within the file. I
> don't need the TODAY() command as that would just show me today's date. I'm
> just trying to automate this field so that I don't have to change it
> everytime I make a update to the file.
Gummby - 25 Jan 2005 20:57 GMT
Thanks, that did it. It's been a while since I wrote a function and your
help put me right back on track.
Thanks,
Gummby
> You could use a custom function:
>
[quoted text clipped - 19 lines]
> > just trying to automate this field so that I don't have to change it
> > everytime I make a update to the file.
Brandoni - 18 Mar 2005 15:55 GMT
This seems close to be working but I am getting a date of 3/19/09 returned
when the saved date (and today's date) is 3/18/05. Any ideas?
Thanks.
> Thanks, that did it. It's been a while since I wrote a function and your
> help put me right back on track.
[quoted text clipped - 25 lines]
> > > just trying to automate this field so that I don't have to change it
> > > everytime I make a update to the file.
Tom Ogilvy - 18 Mar 2005 16:28 GMT
Worked fine for me.
in File=>Properties, what does it have for Modified in the Statistics Tab?

Signature
Regards,
Tom Ogilvy
> This seems close to be working but I am getting a date of 3/19/09 returned
> when the saved date (and today's date) is 3/18/05. Any ideas?
[quoted text clipped - 30 lines]
> > > > just trying to automate this field so that I don't have to change it
> > > > everytime I make a update to the file.
Brandoni - 18 Mar 2005 17:17 GMT
That looks fine (March 8, 2005). Odd?
> Worked fine for me.
>
[quoted text clipped - 38 lines]
> > > > > just trying to automate this field so that I don't have to change it
> > > > > everytime I make a update to the file.
Atreides - 11 Mar 2008 00:16 GMT
Hi Bernie,
This is exactly what I was looking for, thanks! I was previously using
another solution posted here which is to use a subroutine to insert the save
date into a cell (e.g. A1) but then it's a lot less clear what's happening
and other users are not likely to figure out what's going on.
However, it's not quite working for me. I just saved the file, so my save
date should be: 11/03/2008 8:05 AM (using dd/mm/yyyy). The File -> Properties
-> Statistics tab cofirms this. However my custom formula returns:
10/03/2008 12:34 PM
None of the following will update it either: pressing F9, saving again,
closing and re-opening. Is it possible it's picking up the date in a
different time zone? I'm in Australia and 12:34 PM monday right now would be
roughly Honolulu time!).
How can I get this to work?
Thanks
Atreides
> You could use a custom function:
>
[quoted text clipped - 19 lines]
> > just trying to automate this field so that I don't have to change it
> > everytime I make a update to the file.
Atreides - 11 Mar 2008 05:04 GMT
PS - I get the correct date when edit the cell and then press enter. It seems
to recalculate only then and not automatically or when I press F9.
Atreides
> Hi Bernie,
>
[quoted text clipped - 42 lines]
> > > just trying to automate this field so that I don't have to change it
> > > everytime I make a update to the file.