Sub GetFileList()
Dim ThePath As String
Dim fname As String
Dim i As Long
ThePath = ThisWorkbook.Path
fname = Dir(ThePath & "\*.xls")
i = 1
Do While fname <> ""
On Error Resume Next
Workbooks.Open Filename:=fname
On Error GoTo 0
fname = Dir()
i = i + 1
Loop
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.