View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ADG ADG is offline
external usenet poster
 
Posts: 76
Default how to create macro that will display the sub_subfolder

Hi

Copeid below example on FileDialog from the help text in Excel, this could
be an option for you. Just replace the message box code etc

Sub UseFileDialogOpen()

Dim lngCount As Long

' Open the file dialog
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = True
.Show

' Display paths of each file selected
For lngCount = 1 To .SelectedItems.Count
MsgBox .SelectedItems(lngCount)
Next lngCount

End With

End Sub
--
Tony Green


"cyzax7" wrote:

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.