Thread: FileSearch Code
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default FileSearch Code

Pedro,
I gave you sample code to solve this problem in answer to your first posting
of this question. Please stay in the same thread.

Regards,
Tom Ogilvy


"Pedro" wrote in message
...
Hi
I am using the following code to open an excel file, but it is opening not
the esact file Run.xls but
another one ppp-Run.xls. What Change should I do? Thanks
With Application.FileSearch
.NewSearch
.LookIn = "C:\My Documents"
.SearchSubFolders = True
.FileName = "Run.xls"
.MatchTextExactly = True
.FileType = msoFileTypeExcelWorkbooks
End With