how to create macro that will display the sub_subfolder
Sub Finddir()
Dim FSO As Object
Dim fDir As Object
Dim fSubDir As Object
Dim i As Long
Set FSO = CreateObject("Scripting.FileSystemObject")
Set fDir = FSO.GetFolder("C:\MyTest")
For Each fSubDir In fDir.SubFolders
i = i + 1
Cells(i, "A").Value = fSubDir.Name
Next fSubDir
End Sub
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"cyzax7" <u22797@uwe wrote in message news:6173e848330a5@uwe...
I have a main_folder (I name it as Folder_A) which contains many subfolder
(Folder_1, Folder_2,Folder_3, ...Folder_n). where in each subfolder
contains
multiple(more than 100) number of files (.s3p format) that I want to
analyze.
I want to create a macro that will allow user to input the main_folder
directory. Then, the all the subfolder will be listed up on the mainsheet,
so
that user can choose which subfolder they want to analyze. (where user can
analyzed 1, 2, more or all the subfolder). Can someone help me on this?
I have tried so many ways, but it doesn't works.
|