Using FoundFiles to list by path and filename

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

I am using a macro that lists files that are in the directory I choose
via browseforfolder. The founfiles function lists files
alphabetically, regardless of which subfoler it is in. Is there a way
to get a list of files in a folder to appear alphabetically, and then
continue the list with files in the first subfolder and so on?

for example, if i have a folder called 'pictures' that has sub folders
'home' and 'vacation' I would want all the files in 'pictures' to be
listed, then the files in 'home', then the files in 'vacation'. Thanks
for any help/advice you can give.
 
If you are going to put them in a worksheet, why not put them in the
worksheet and sort them.
 
figured it out, i just did a sort ascending command. works like a
champ.

range("B9:F" & count + 9).Select
Selection.Sort Key1:=range("B9"),
Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top