Application file search error in Office XP

G

Guest

I have this vba and it will not result in the file that
I've searching. I'ved used this code in MS Excel 97 and
worked fine. Recently I upgraded to Office XP (SP2) and
got the error.


Dim fsoFileSearch As FileSearch
Set fsoFileSearch = Application.FileSearch

With fsoFileSearch
.NewSearch
.LookIn = "c:\Pres\Reports"
.Filename = "*.xls"
.SearchSubFolders = False
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderDescending) > 0 Then
 

Ask a Question

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.

Ask a Question

Similar Threads


Top