Open Multiple files from Open dialog

  • Thread starter Thread starter Giri
  • Start date Start date
G

Giri

Hi,

How can i select multiple .xls to open & also capture
the name of each of those .xls when i invoke the Open
dialog from the code ? Currently, i am using the following:

1. File_Open = Application.GetOpenFileName()
2. Workbooks.Open Filename:=File_Open

Point 1 enables me to select only ONE file i.e allows to
select the filename thru the Open dialog. Point 2 actually
opens the file.

So, i want to know how i can make the Open dialog allow me
to select multiple files & how do i capture the names of
the files selected.

Any help in this regard is appreciated. Thank You in
advance.

Regards,
Giri
 
Hi,

Got the solution using:
File_Open = Application.GetOpenFileName(, , , , True)

Regards,
Giri
 
In more detail :-

'---------------------------------
Sub test()
Dim File_Open As Variant
Dim FileCount As Long
'-
File_Open = Application.GetOpenFilename(, , , , True)
FileCount = UBound(File_Open)
For f = 1 To FileCount
MsgBox (File_Open(f))
Next
End Sub
'-----------------------------------
 
Back
Top