VBAを使用してExcel 2010でこれを行う方法を探しています。
Application.FileSearch メソッドを使用して Excel 2003 で可能でしたが、これは廃止されました。(下記参照)
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
Excel 2010でこれを行う方法はありますか?
ありがとう