Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save file as todays date | Excel Discussion (Misc queries) | |||
Recovering File Info Specifically Save Date or Print Date | Excel Discussion (Misc queries) | |||
Can I write an excel formula to display the file save date? | Excel Worksheet Functions | |||
a protected cell w/formula only updates only on file save? | Excel Discussion (Misc queries) | |||
Sort and Save File by Date | Excel Programming |