No, è che sono scemo io e mi dimentico i pezzi per strada.
codice:Public Sub AddDirSep(ByRef Path As String) Const PathSep As String = "\" If Right$(Path, 1)<>PathSep Then Path = Path + PathSep End Function Public Function GetLastModifiedFile(ByVal Directory As String) Dim fileName As String Dim lastAccessDate As Date Dim curLastAccessDate As Date AddDirSep(Directory) fileName = Dir(Directory + "*.*") While fileName<>"" curLastAccessDate = FileDateTime(Directory + fileName) If curLastAccessDate > lastAccessDate Then lastAccessDate = curLastAccessDate GetLastModifiedFile = Directory + fileName End If fileName = Dir Wend End Function