View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Prompting for a Directory Name

According to the help on AllowMultiselect, it is ignored for picking folders.

Has your experience been different?

--
Regards,
Tom Ogilvy


"stevebriz" wrote:


Private Sub CommandButton1_Click()

Dim lngCount As Long

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

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

End With

End Sub