I am looking for a way to do this in Excel 2010 using VBA.
This was possible in Excel 2003 using the Application.FileSearch method, but it was discounted. (see below)
Dim sFileName As String sFileName = "" With Application.FileSearch .NewSearch .LookIn = sDir .Filename = "*.*" .Execute msoSortByLastModified, msoSortOrderDescending If .FoundFiles.Count > 0 Then sFileName = .FoundFiles(1) End With
Any ideas how to do this in Excel 2010?
thanks
Irfy source share