View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default Searching through Subfolders

Chip Pearson has instructions and a sample file you can download to create a
folder/file tree view - maybe that will work for you, or provide a good
starting point:
http://www.cpearson.com/excel/foldertreeview.aspx

Hope this helps,

Hutch

"Mark" wrote:

Hello

Wondering how to do a search for .htm files that are all under one
main folder, but also through a bunch of subfolders under the main
folder. The code I have so far is:

myPath = "C:\MySites\"
workfile = Dir(myPath & "*.htm")

Using this code I can only return files that are in MySites and not
the subfolders within that folder. Is there a way to do this or do I
have to name each folder within MySites?

Thanks very much
Mark