View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
jbhoop
 
Posts: n/a
Default allow user to select folder

I am using the following code to merge some files, can someone help me
figure out how to code it so that when macro command button is hit a
prompt window will come up allowing user to select folder and location
for files to be merged.

With Application.FileSearch
.NewSearch
.LookIn = "c:\test" 'folder to use
.SearchSubFolders = False
.Filename = "*.xls"
.FileType = msoFileTypeExcelWorkbooks
If .Execute() 0 Then