Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a macro where I do the following: 1) Search for all files in a directory: Set fs = Application.FileSearch With fs .LookIn = dirtosearch .SearchSubFolders = True .Filename = "*.*" .Execute If .Execute(SortBy:=msoSortByFileName, _ SortOrder:=msoSortOrderAscending) 0 Then Max = .FoundFiles.Count for i = 1 to max list(i) = .foundfiles(i) next i ******at this point I pause the code And look at the list array using the watch window, expecting that the entries are in alphabetical order by the filename. What I find is it is "almost" in alphabetical order. I found, for example, the filename for 1213="Mat...", 1214="Man...", 1215="Mat..."! Help! For my code I need the files to be alphabetized. What am I doing wrong? Suggestions? Thanks everyone, Phil |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
order of opening files with sumproduct returning #REF! | Excel Worksheet Functions | |||
How do you view files in an alphabetical ORDER ? | Excel Discussion (Misc queries) | |||
Alphabetical order of files | Excel Discussion (Misc queries) | |||
why are my files out of alphabetical order? | Excel Discussion (Misc queries) | |||
FileSearch macro returning incorrect docs? | Excel Programming |