+ Reply to Thread
Results 1 to 5 of 5

FileDateTime function - how to make it authomatic?

  1. #1
    Registered User
    Join Date
    03-11-2005
    Posts
    87

    FileDateTime function - how to make it authomatic?

    Hi all,

    Have a shared workbook with three worksheets - I am trying to see in a cell the last of them that has been changed (and saved) so for the others to catch up, without waiting the minumum 5 mins allowed in the tabs.

    I am using a FileDateTime function to show the last time/date of the file in the shared directory.

    It works fine the first time. However, to see the latest updated value I need to go in the cell and retype the function manually (i.e. is not automatic). Is there a way to go around it?

    Many thanks

    BC

  2. #2
    Bob Phillips
    Guest

    Re: FileDateTime function - how to make it authomatic?

    What code are you using?

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "bondcrash" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hi all,
    >
    > Have a shared workbook with three worksheets - I am trying to see in a
    > cell the last of them that has been changed (and saved) so for the
    > others to catch up, without waiting the minumum 5 mins allowed in the
    > tabs.
    >
    > I am using a FileDateTime function to show the last time/date of the
    > file in the shared directory.
    >
    > It works fine the first time. However, to see the latest updated value
    > I need to go in the cell and retype the function manually (i.e. is not
    > automatic). Is there a way to go around it?
    >
    > Many thanks
    >
    > BC
    >
    >
    > --
    > bondcrash
    > ------------------------------------------------------------------------
    > bondcrash's Profile:

    http://www.excelforum.com/member.php...o&userid=20997
    > View this thread: http://www.excelforum.com/showthread...hreadid=553997
    >




  3. #3
    Registered User
    Join Date
    03-11-2005
    Posts
    87
    This is the one I am using


    Function last_time()
    Dim all_saved As Date

    all_saved = FileDateTime("\\Your-1af8a1ea42\SharedDocs\control.xls")
    last_time = all_saved

    End Function


    I have tried also reopening the sheet or recalculating but only way to update the right time is to go in the cell manually and re-enter it


    Cheers

    BC

  4. #4
    Bob Phillips
    Guest

    Re: FileDateTime function - how to make it authomatic?

    It won't recalculate automatically, as there is no cell changed when you
    save, and the formula doesn't reference anything, so there is nothing to
    trigger it.

    You could trap the save event and write to the cell.

    Or, if you use this code you can force a recalculate with Alt-F9

    Function last_time()
    Dim all_saved As Date

    Application.Volatile
    all_saved = FileDateTime(ThisWorkbook.FullName)
    last_time = all_saved

    End Function



    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "bondcrash" <[email protected]> wrote
    in message news:[email protected]...
    >
    > This is the one I am using
    >
    >
    > Function last_time()
    > Dim all_saved As Date
    >
    > all_saved = FileDateTime("\\Your-1af8a1ea42\SharedDocs\control.xls")
    > last_time = all_saved
    >
    > End Function
    >
    >
    > I have tried also reopening the sheet or recalculating but only way to
    > update the right time is to go in the cell manually and re-enter it
    >
    >
    > Cheers
    >
    > BC
    >
    >
    > --
    > bondcrash
    > ------------------------------------------------------------------------
    > bondcrash's Profile:

    http://www.excelforum.com/member.php...o&userid=20997
    > View this thread: http://www.excelforum.com/showthread...hreadid=553997
    >




  5. #5
    Registered User
    Join Date
    03-11-2005
    Posts
    87
    cheers Bob - missing line... now working function.... :-)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1