Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Aysel Kaya   on Sep 24 In MS Office Category.

  
Question Answered By: Gavril Bonkob   on Sep 24

If you do the search  manually using the network path  does it work?

Also you may need three or four backslashes at the beginning.

You are using CurDir?

To find out what is happening, put  a breakpoint on the .execute and then, when
it breaks, put the mouse over the search variables and see if they are
exactly what you expect.

Not directly relevant but have you seen this bit in the help files?
++++++++++++++++++++++++++++++++++
Use the NewSearch method to reset the search criteria to the default settings.
All property values are retained after each search is run, and by using the
NewSearch method you can selectively set properties for the next file  search
without manually resetting previous property values. The following example
resets the search criteria to the default settings before beginning a new
search.

With Application.FileSearch
.NewSearch
.LookIn = "C:\My Documents"
.SearchSubFolders = True
.FileName = "Run"
.MatchTextExactly = True
.FileType = msoFileTypeAllFiles
End With
++++++++++++++++++++++++++++++++++++

Share: