Sub ListExcelFiles()
Set fs = CreateObject("Scripting.FileSystemObject")
Set F = fs.GetFolder(Range("A1").Value)
iRow = 1
On Error Resume Next
For Each myfile In F.Files
If myfile.Name Like "*.xls?" Then
Cells(iRow, 2).Value = myfile.Name
iRow = iRow + 1
N = N + 1
End If
Next myfile
Columns("B").AutoFit
MsgBox N & " files listed"
End Sub
You are welcome - thanks for the reply.big thank you it's working.
I don't see a post with questions.Hello . Posted some questions pls respond ?