Thanks for below. It works great. How do I get the file to open after it
locates the current file?
On Thu, Feb 5, 2009 at 11:41 AM, Paul Schreiner wrote:
> This should work:
>
> Option Explicit
> Sub lastest_file()
> Dim LastFileName, LastFileDate
> Dim fso, Folder, f, Files, File
>
This should work:
Option Explicit
Sub lastest_file()
Dim LastFileName, LastFileDate
Dim fso, Folder, f, Files, File
Set fso = CreateObject("Scripting.FileSystemObject")
Folder = "c:\temp3\"
Set f = fso.getfolder(Folder)
Set Files = f.Files
LastFileDate = 0
For Each