Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Directory Search

Try something like the following:

Dim FSO As Object
Dim Fldr As Object
Const FOLDER_NAME = "C:\Temp"
Set FSO = CreateObject("Scripting.FileSystemObject")
For Each Fldr In FSO.getfolder(FOLDER_NAME).subfolders
Debug.Print Fldr.Name
Next Fldr


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"cogent" wrote in message
...
Hello

I know how to use the File.Search function. What do I do if I

only want the
names of the folders in a particular direectory instead of the

files?

Thank you!

W




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Functions (search within search result) reply to this please Nick Excel Worksheet Functions 1 February 17th 09 03:57 AM
search folder/directory for a phrase inside excel files pwrichcreek Excel Discussion (Misc queries) 5 August 11th 08 09:39 PM
How do I search excel spreadsheets using multiple search criteria. Kasper Excel Worksheet Functions 4 December 15th 05 12:26 AM
Check if directory empty OR no of files in directory. Michael Beckinsale Excel Programming 2 December 4th 03 10:12 PM
Directory search screen CLUPE Excel Programming 1 July 24th 03 09:41 PM


All times are GMT +1. The time now is 02:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"