Hi i've just upgraded my Excel from 2000 to 2007 and now this macro have stop working
Sub Dirlist()
Dim i As Long
With Application.FileSearch
.NewSearch
' *** Change Folder name to suit ***
.LookIn = "C:\My Documents"
.SearchSubFolders = True
Dir (Folder & "\" & Extension)
.Filename = "*.xls*"
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Cells(i, 1).Value = Right(.FoundFiles(i), InStr(StrReverse(.FoundFiles(i)), "\") - 1)
Next
End If
End With
End Sub
it stops at 'With Application.FileSearch' and i'm not sure what to put in inorder for it to carry on working
it used to look through all my MyDocuments and pick out any XLS files
can anyone help
Thanks
Graham
Sub Dirlist()
Dim i As Long
With Application.FileSearch
.NewSearch
' *** Change Folder name to suit ***
.LookIn = "C:\My Documents"
.SearchSubFolders = True
Dir (Folder & "\" & Extension)
.Filename = "*.xls*"
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Cells(i, 1).Value = Right(.FoundFiles(i), InStr(StrReverse(.FoundFiles(i)), "\") - 1)
Next
End If
End With
End Sub
it stops at 'With Application.FileSearch' and i'm not sure what to put in inorder for it to carry on working
it used to look through all my MyDocuments and pick out any XLS files
can anyone help

Thanks
Graham