Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

formula to get the file save date in a cell?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gummby - 25 Jan 2005 17:15 GMT
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.
Bernie Deitrick - 25 Jan 2005 18:38 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.