Thanks,
Rob
Is your plan to have the list of files available as soon as the userform is
activated or is the user going to do something else that will trigger the
listbox update (for example, selecting the folder where the files are)?
Is the user only going to be presented files in the folder or might there be
subfolders as well?
Steve Yandl
"br549" <br...@discussions.microsoft.com> wrote in message
news:FFF3B9A1-ACB2-4E1B...@microsoft.com...
Sub PickFiles()
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
Worksheets("FileSelection").Select
Cells(lngCount + 8, 6).Value = .SelectedItems(lngCount)
Next lngCount
End With
End Sub
The user clicks a button that I assigned to this macro. Might not be a very
elegant solution, but works well enough for my application.
Thanks for the suggestions,
Rob