jmp1:
.InitialFileName = DefaultPath & "\"
.Show
End With
If GetFolder = Empty Then GoTo errHandler
Exit Function
errHandler:
MsgBox "Please select a folder."
GoTo jmp1
End Function
Dim cnt As DAO.Database
Dim rst As DAO.Recordset
Range("A2").Select
.NewSearch
.LookIn = folderpath
.SearchSubFolders = False
.Filename = "*.xls"
.Execute
For i = 1 To .FoundFiles.Count
Set cnt = DBEngine.OpenDatabase(.FoundFiles(i), False, False, "Excel 8.0")
Set rst = cnt.OpenRecordset("Sheet1$")
Cells(Range("E1").End(xlDown).Row + 1, 1).Select
cnt.Close
Next
End With
End Sub
See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz.

