Finding the last modified date requires looping through each file in a pathname and evaluating each modified data to see if it is greater than the next.

If this is a recurring need, this can be done, if it is a one time thing, looping through open workibooks is far more simple..

amybe something like this will help? Untested...must set reference to Windows Script Host Object Model. In theory it will look for a modified date equal to today (in mm/dd/yy) format and if it finds one, it sets that as your workbook...not sure if it helps, but a modified approach from where you are at...


[VBA]

Dim objFSO As FileSystemObject, objFolder As folder
Dim objFile As file, strSourcePath As String

strSourcePath = "Z:\Performance\Daily Data\Sample" 'Change as needed

ModToday = False
Set objFSO = New FileSystemObject 'creates a new File System Object reference
Set objFolder = objFSO.GetFolder(strSourcePath)
For each objFile in objFolder
If ModToday = False Then
If Format(objFile.DateLastModified, "mm/dd/yy") = Format(Now(), "mm/dd/yy") Then
ModToday = True
myFiletoCopy = objFile.Name
Exit For
End If
End If
Next objFile

Set Wkb = Workbooks.Open(FileName:=strSourcePath & "\" & myFiletoCopy)
For Each Ws In Wkb.Worksheets
Ws.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
Next Ws
Wkb.Close False

[/VBA]

I have code for accessing file system objects at the below linkl, for copying files from a folder...

http://www.vbaexpress.com/kb/getarticle.php?kb_id=827