View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Mark is offline
external usenet poster
 
Posts: 989
Default quick list of directories..

I'm looking for a quick way to get a list of directories.

I first tried this type of scheme from the Scripting.FileSystemObject 's

Set f = fs.getfolder(stDir)
Set fc = f.SubFolders

but that seems to run really slowly for any directory with a couple of
hundred subfolders.

I also tried the Dir function with the vbDirectory set as the attribute.

That gets the directories, but it gets them along with the files (ahah! I
think that will work for specifically what I'm doing now, now that I think
about it again).

But I'd still like to know a faster way to get only the subfolder names, if
someone knows one.

Thanks.