Results 1 to 9 of 9

insert savedate field into excel

This is a discussion on insert savedate field into excel within the Excel Questions forums, part of the Question Forums category; Is there any way to show the save date of the excel document in the same way that ms word ...

  1. #1
    New Member
    Join Date
    Jun 2002
    Posts
    21

    Default

    Is there any way to show the save date of the excel document in the same way that ms word does when you insert the savedate field?

  2. #2
    Board Regular XL-Dennis's Avatar
    Join Date
    Jul 2002
    Location
    Östersund, Sweden
    Posts
    1,922

    Default

    cpugh,

    Yes, but it require a User Defined Function (UDF).


    Public Function LastSaved() As String
    Application.Volatile (True)
    LastSaved = ThisWorkbook.BuiltinDocumentProperties("Last Save Time")
    End Function


    Mail back if You need help with creating it

    HTH,
    Dennis

    Kind regards,
    Dennis

    .NET & Excel | 2nd edition PED | MVP

  3. #3
    New Member
    Join Date
    Jun 2002
    Posts
    21

    Default

    Thanks - that's perfect! I set it up to run each time the spreadsheet is opened, and it pastes LastSaved into a cell in one of the worksheets )

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,948

    Default

    Dennis, why did you make it Volatile ?

    That function *shouldn't* change THAT often !

  5. #5
    Board Regular XL-Dennis's Avatar
    Join Date
    Jul 2002
    Location
    Östersund, Sweden
    Posts
    1,922

    Default

    On 2002-08-26 17:05, Juan Pablo G. wrote:
    Dennis, why did you make it Volatile ?

    That function *shouldn't* change THAT often !
    LOL
    While testing it out I saved it a lot and it didn´t update so I placed the Volatile-function into it....

    Kind regards,
    Dennis
    _________________
    "Windows was not able to find any keyboard. Press F1-button to try again or F2-button for cancel."

    [ This Message was edited by: XL-Dennis on 2002-08-27 00:41 ]

  6. #6
    New Member
    Join Date
    Feb 2007
    Posts
    7

    Default

    Hi Denis,

    Thanks for the tip. However, somehow it works differently with me! Here's what I did:
    1. Opened the VBA editor (Press Alt+F11)
    2. Inserted a new module (Insert > Module)
    3. Copy/Pasted the user defined function LastSaved as shown here.
    4. Left the VBA editor (Press Alt+Q)

    At first, it displayed: 06.06.2007 and a time value. I then saved, closed and re-opened Excel. The function seemed to work. Now, it is stuck at this other value: 30.10.2007 12:55:22! And no matter what I do, the same value is shown. What have I done wrong?

    I am using English Excel on a German machine.

    Thanks

  7. #7
    New Member
    Join Date
    Jul 2011
    Posts
    1

    Default Re: insert savedate field into excel

    That's really useful, but is it possible just to return the date rather than the date and time?

    Thanks,

    Mark

  8. #8
    New Member
    Join Date
    Jul 2012
    Posts
    1

    Default Re: insert savedate field into excel

    Quote Originally Posted by MBurgin View Post
    That's really useful, but is it possible just to return the date rather than the date and time?

    Thanks,

    Mark
    Try this;

    LEFT(LastSave();10)

  9. #9
    New Member
    Join Date
    Jan 2013
    Posts
    1

    Default Re: insert savedate field into excel

    Quote Originally Posted by ahmetgns View Post
    Try this;

    LEFT(LastSave();10)
    Another option to displaying only the date is:

    =TEXT(LastSaved(), "m/d/YYYY")

    You can replace the m/d/YYYY with whatever your preferred date formatting is.

    Sorry for bumping such an old thread.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com