Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for file modified date
I have an Excel file (call it file A) that draws information from a separate
file (file B)that gets updated periodically. I would like to have the date that file B was last modified appear in a cell in file A. I've looked through most of the excel formulas but can't seem to find one that will do this. Is this doable? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for file modified date
Maybe this
Sub sonic() moddate = Format(FileDateTime("c:\book2.xls"), "m/d/yy h:m ampm") MsgBox moddate End Sub Mike "Pastel Hughes" wrote: I have an Excel file (call it file A) that draws information from a separate file (file B)that gets updated periodically. I would like to have the date that file B was last modified appear in a cell in file A. I've looked through most of the excel formulas but can't seem to find one that will do this. Is this doable? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for file modified date
Apologies, you wanted it in a cell so put this in a regular module
Function moddate(myfile) As String moddate = Format(FileDateTime(myfile), "m/d/yy h:m ampm") End Function call with =moddate(full file path) Mike "Pastel Hughes" wrote: I have an Excel file (call it file A) that draws information from a separate file (file B)that gets updated periodically. I would like to have the date that file B was last modified appear in a cell in file A. I've looked through most of the excel formulas but can't seem to find one that will do this. Is this doable? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for file modified date
Thanks Mike,
Before I try it out, does the "myfile" part have to include the whole path if both files are in the same folder? "Mike H" wrote: Apologies, you wanted it in a cell so put this in a regular module Function moddate(myfile) As String moddate = Format(FileDateTime(myfile), "m/d/yy h:m ampm") End Function call with =moddate(full file path) Mike "Pastel Hughes" wrote: I have an Excel file (call it file A) that draws information from a separate file (file B)that gets updated periodically. I would like to have the date that file B was last modified appear in a cell in file A. I've looked through most of the excel formulas but can't seem to find one that will do this. Is this doable? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date modified changes when file not saved | Excel Discussion (Misc queries) | |||
insert the date the file was last modified | Excel Discussion (Misc queries) | |||
Last modified date of a linked file | Excel Discussion (Misc queries) | |||
date file modified | Excel Discussion (Misc queries) | |||
insert the date the file was last modified | Excel Discussion (Misc queries) |