Application.GetOpenFilename
Sub ManyFiles()
Dim x As Variant
x = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls*), *.xls*",Title:="Choose Files", MultiSelect:=True)
On Error Resume Next
If x = "False" Then Exit Sub
On Error GoTo 0
For i = 1 To UBound(x)
MsgBox "You selected " & x(i)
Next i
End Sub
Related examples in the same category