Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default formula to get the file save date in a cell?

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default formula to get the file save date in a cell?

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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default formula to get the file save date in a cell?

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

"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.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default formula to get the file save date in a cell?

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.

"Gummby" wrote:

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

"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.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default formula to get the file save date in a cell?

Worked fine for me.

in File=Properties, what does it have for Modified in the Statistics Tab?

--
Regards,
Tom Ogilvy

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

"Gummby" wrote:

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

"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.







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default formula to get the file save date in a cell?

That looks fine (March 8, 2005). Odd?

"Tom Ogilvy" wrote:

Worked fine for me.

in File=Properties, what does it have for Modified in the Statistics Tab?

--
Regards,
Tom Ogilvy

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

"Gummby" wrote:

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

"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.






  #7   Report Post  
Posted to microsoft.public.excel.programming
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.




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default formula to get the file save date in a cell?

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




"Atreides" wrote:

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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save file as todays date Rinto Syah Excel Discussion (Misc queries) 4 May 4th 09 11:39 AM
Recovering File Info Specifically Save Date or Print Date Gadgetgw Excel Discussion (Misc queries) 4 October 6th 08 08:43 PM
Can I write an excel formula to display the file save date? Bob-123456789 Excel Worksheet Functions 1 January 26th 06 07:50 PM
a protected cell w/formula only updates only on file save? snap Excel Discussion (Misc queries) 2 May 18th 05 12:35 PM
Sort and Save File by Date James Stephens Excel Programming 0 January 13th 04 03:41 AM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"