Application.filesearch results sorting
Posted by Tim Butler on December 01, 2000 3:24 AM
I'm trying to import files with a macro. The files have names in this format:
***1.xxx
***2.xxx
-
***9.xxx
***10.xxx
The .foundfiles collection returns them sorted by filename as default, i.e.
***1.xxx
***10.xxx
etc. I want them sorted in the order that they were saved. I am trying:
with application.filesearch
.newsearch
if .execute(sortby:=msosortbylastmodified)>0 then
Loadfile
end if
end with
but this invariably returns files sorted by name. Am I missing something? I obviously am. Any pointers deeply appreciated. Ta.