View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Atreides Atreides is offline
external usenet poster
 
Posts: 41
Default formula to get the file save date in a cell?

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




"Bernie Deitrick" wrote:

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

"Gummby" wrote in message
...
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.