Try this code:
Option Explicit
Public newestFile As Object
Sub start()
Call getNewestFile("C:\yourpath")
MsgBox newestFile.Name
End Sub
Private Sub getNewestFile(folderPath As String)
Dim objFSO As Object
Dim objFolder As Object
Dim objFile As Object
'get the filesystem object from the system
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(folderPath)
'go through the subfolder and call itself
For Each objFile In objFolder.SubFolders
Call getNewestFile(objFile.Path)
Next
For Each objFile In objFolder.Files
If newestFile Is Nothing Then
Set newestFile = objFile
ElseIf objFile.DateLastModified > newestFile.DateLastModified Then
Set newestFile = objFile
End If
Next
End Sub