Slow File Search
The code below slows down for several seconds because of
the "LastModified" line, and I can't figure out why, since
there are only a few dozen files involved here. If I take
out that one line, the code executes instantly. Any ideas?
Directory = Range("Inputsubdirectory").Value
On Error Resume Next
With Application.FileSearch
.NewSearch
.LookIn = Directory
.Filename = "*.xls*"
.LastModified = msoLastModifiedLastMonth
.SearchSubFolders = False
.Execute
End With
|