You can use application.getopenfilename and multiselect:=true to allow the user
to select more than one file.
But there are lots of ways to "combine" data from different
workbooks/worksheets.
Ron de Bruin has tons of examples here:
http://www.rondebruin.nl/tips.htm
look for Copy/Paste/Merge examples
But here's some code that may get you started:
Option Explicit
Sub testme01()
Dim myFileNames As Variant
Dim RptWkbk As Workbook
Dim wkbk As Workbook
Dim fCtr As Long
myFileNames = Application.GetOpenFilename("Excel Files, *.xls",_
MultiSelect:=True)
If IsArray(myFileNames) = False Then
Exit Sub
End If
Set RptWkbk = Workbooks.Add(1)
RptWkbk.Worksheets(1).Name = "DeleteMeLater"
For fCtr = LBound(myFileNames) To UBound(myFileNames)
'open each workbook that the user selected
Set wkbk = Workbooks.Open(Filename:=myFileNames(fCtr), ReadOnly:=True)
'this is the part that would do the combining
wkbk.Worksheets("Sheet2").Copy _
after:=RptWkbk.Worksheets(RptWkbk.Worksheets.Count)
'close that workbook
wkbk.Close savechanges:=False
Next fCtr
Application.DisplayAlerts = False
RptWkbk.Worksheets("Deletemelater").Delete
Application.DisplayAlerts = True
End Sub
There is no validation checking that the sheets are named correctly.
--
Dave Peterson- Hide quoted text -
- Show quoted text -