Dim f As Object
Set f = Application.FileDialog(3)
With f
' Allow Mulitple Selections
.AllowMultiSelect = True
' Set the title of the dialog box. '
.Title = "Please select one or more files"
' Clear out the current filters, and add our own.'
.Filters.Clear
.Filters.Add "Access Databases", "*.MDB"
.Filters.Add "Access Projects", "*.ADP"
.Filters.Add "All Files", "*.*"
End With '--- f
' Call .Show and show the dialog. If the method returns True, the user picked at least one file.
' If the method returns False, the user clicked Cancel.
If f.Show Then
MsgBox f.SelectedItems.Count & " file(s) were chosen."
' Display the full path to each file that was selected
Dim i As Integer
For i = 1 To f.SelectedItems.Count
MsgBox f.SelectedItems(i)
Next i
End If