Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date modified changes when file not saved BAC Excel Discussion (Misc queries) 5 January 3rd 08 12:49 PM
insert the date the file was last modified Ted M H Excel Discussion (Misc queries) 5 September 2nd 07 03:28 PM
Last modified date of a linked file tjc Excel Discussion (Misc queries) 8 August 31st 07 04:30 PM
date file modified Matthew Excel Discussion (Misc queries) 2 October 11th 06 06:52 PM
insert the date the file was last modified Hoff Excel Discussion (Misc queries) 8 November 21st 05 01:31 PM


All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"