ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   FileDateTime function - how to make it authomatic? (https://www.excelbanter.com/excel-programming/364946-filedatetime-function-how-make-authomatic.html)

bondcrash[_24_]

FileDateTime function - how to make it authomatic?
 

Hi all,

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

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

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

Many thanks

B

--
bondcras
-----------------------------------------------------------------------
bondcrash's Profile: http://www.excelforum.com/member.php...fo&userid=2099
View this thread: http://www.excelforum.com/showthread.php?threadid=55399


Bob Phillips

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

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




bondcrash[_25_]

FileDateTime function - how to make it authomatic?
 

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 t
update the right time is to go in the cell manually and re-enter it


Cheers

B

--
bondcras
-----------------------------------------------------------------------
bondcrash's Profile: http://www.excelforum.com/member.php...fo&userid=2099
View this thread: http://www.excelforum.com/showthread.php?threadid=55399


Bob Phillips

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

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





All times are GMT +1. The time now is 04:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com