Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I've seen several posts on how to display last saved date for the active
workbook, but I'm searching for the last saved date of a linked file. Can anyone suggest a way to use BuiltInDocumentProperties with a reference to the another file? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub getfiles()
Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile("c:\temp\book1.xls") MsgBox ("last Modified = " & f.datelastmodified) End Sub "tjc" wrote: I've seen several posts on how to display last saved date for the active workbook, but I'm searching for the last saved date of a linked file. Can anyone suggest a way to use BuiltInDocumentProperties with a reference to the another file? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Joel.
But, I'm looking for a user defined function. Maybe something along the lines of =lastsaved(c:/otherfile!A1) "Joel" wrote: Sub getfiles() Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile("c:\temp\book1.xls") MsgBox ("last Modified = " & f.datelastmodified) End Sub "tjc" wrote: I've seen several posts on how to display last saved date for the active workbook, but I'm searching for the last saved date of a linked file. Can anyone suggest a way to use BuiltInDocumentProperties with a reference to the another file? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Simple. We change the macro to a function
call function with a string name of a file in double quotes =lastsaved("c:\temp\book1.xls") Function lastsaved(FileName As String) Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile(FileName) lastsaved = f.datelastmodified End Function "tjc" wrote: Thanks Joel. But, I'm looking for a user defined function. Maybe something along the lines of =lastsaved(c:/otherfile!A1) "Joel" wrote: Sub getfiles() Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile("c:\temp\book1.xls") MsgBox ("last Modified = " & f.datelastmodified) End Sub "tjc" wrote: I've seen several posts on how to display last saved date for the active workbook, but I'm searching for the last saved date of a linked file. Can anyone suggest a way to use BuiltInDocumentProperties with a reference to the another file? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Joel. This code works great.
For my purposes, is there a way to use a cell reference that would be updated when along with other links in the worksheet instead of the string reference? "Joel" wrote: Simple. We change the macro to a function call function with a string name of a file in double quotes =lastsaved("c:\temp\book1.xls") Function lastsaved(FileName As String) Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile(FileName) lastsaved = f.datelastmodified End Function "tjc" wrote: Thanks Joel. But, I'm looking for a user defined function. Maybe something along the lines of =lastsaved(c:/otherfile!A1) "Joel" wrote: Sub getfiles() Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile("c:\temp\book1.xls") MsgBox ("last Modified = " & f.datelastmodified) End Sub "tjc" wrote: I've seen several posts on how to display last saved date for the active workbook, but I'm searching for the last saved date of a linked file. Can anyone suggest a way to use BuiltInDocumentProperties with a reference to the another file? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
A String is a String is a String. Doesn't matter where it comes from. If
you have a cell that is text then =lastsaved(A1) where A1 = "c:\temp\book1.xls" "tjc" wrote: Thanks Joel. This code works great. For my purposes, is there a way to use a cell reference that would be updated when along with other links in the worksheet instead of the string reference? "Joel" wrote: Simple. We change the macro to a function call function with a string name of a file in double quotes =lastsaved("c:\temp\book1.xls") Function lastsaved(FileName As String) Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile(FileName) lastsaved = f.datelastmodified End Function "tjc" wrote: Thanks Joel. But, I'm looking for a user defined function. Maybe something along the lines of =lastsaved(c:/otherfile!A1) "Joel" wrote: Sub getfiles() Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile("c:\temp\book1.xls") MsgBox ("last Modified = " & f.datelastmodified) End Sub "tjc" wrote: I've seen several posts on how to display last saved date for the active workbook, but I'm searching for the last saved date of a linked file. Can anyone suggest a way to use BuiltInDocumentProperties with a reference to the another file? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
File Properties Modified Date not changing | Excel Discussion (Misc queries) | |||
date file modified | Excel Discussion (Misc queries) | |||
Excel File Open Box - want Date Modified | Excel Discussion (Misc queries) | |||
insert the date the file was last modified | Excel Discussion (Misc queries) | |||
How do I add the file last modified date into an Excel header? | Excel Discussion (Misc queries) |