Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm not exactly sure what you will do with the folders but try this. Option Explicit ' Add Reference Microsoft Scripting Runtime Public Sub FindFolders() Dim fsoFileSystemObject As FileSystemObject Dim parentFolder As Folder Dim collectionOfFolders As Folders Dim childFolder As Folder Dim strTemp As String Set fsoFileSystemObject = CreateObject("Scripting.FileSystemObject") Set parentFolder = fsoFileSystemObject.GetFolder("C:\") Set collectionOfFolders = parentFolder.SubFolders For Each childFolder In collectionOfFolders strTemp = strTemp + childFolder.Name + vbCrLf Next MsgBox strTemp End Sub Good luck. *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SUMPRODUCT search versus other method | Excel Discussion (Misc queries) | |||
"Search for files and folders" option doesnot work for 100% | Excel Discussion (Misc queries) | |||
Refine search criteria for Find Method | Excel Programming | |||
better search method | Excel Programming | |||
Find Method ; search area | Excel Programming |