How to Use DateLastModified Property in VBA?
Run first macro to get second macro to return the date.
Sub anotherfiledate()
ShowFileAccessInfo ("closedfile.xls")
End Sub
Sub ShowFileAccessInfo(filespec)
Dim fs, f, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
s = UCase(filespec) ' & vbCrLf
Range("K3").Value = s & " Last Modified: " & f.DateLastModified
End Sub
Gord Dibben MS Excel MVP
On Thu, 11 Jan 2007 11:11:00 -0800, HROBERTSON
wrote:
How can I use the DateLastModified property in VBA to pull into my current
open spreadsheet, the last modified date of another file (one that is
closed.) I want, if possible, to add it to a cell.
As always, your help is greatly appreciated.
Thank You!
|