View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Getting FileName from Search

Doesn't the msgbox give you the filename?

Rick wrote:

I am using this search:
With Application.FileSearch
.LookIn = DefaultFilePath
.TextOrProperty = FleNme
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) 0 Then
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With

How can I retrieve the file name?
I've tried everything I know, which isn't much.


--

Dave Peterson