I got this code off of this website and it seemed to be working great when there were only a few files in the folder. It is supposed to open the file in a folder with the most recent last modified date. It is now opening older workbooks for some reason. Also the code that tells it to only look at macro workbooks (Like "*xlsm) is making it skip past all files. But with this code disabled or not, something's amiss. Any ideas?

Sub Open_File_Based_On_Last_Modified()

Dim DateLastModified As Date
Dim Filename As String
Dim Filepath As Variant
Dim Item As Variant
Dim oFolder As Variant
Dim NewestWkb As String
Dim ThisWorkbookDate As Long


Filepath = "M:\My Folder\Karen P\JP\Daily QA Report\Daily Review Archive"
Filepath = IIf(Right(Filepath, 1) <> "\", Filepath & "\", Filepath)
Set oShell = CreateObject("Shell.Application")
Set oFolder = oShell.Namespace(Filepath)
For Each Item In oFolder.Items
If LCase(Item.Name) Like "*.xlsm" Then
If oFolder.GetDetailsOf(Item, 3) > LastDateModified Then
NewestWkb = Item.Name
LastModified = oFolder.GetDetailsOf(Item, 3)
End if
End If
Next Item
Workbooks.Open Filepath & NewestWkb & ".xlsm"
End Sub