O
office_operator
Sub a1()
With Application.FileSearch
.LookIn = "C:\"
.FileName = "1.txt"
If .Execute > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With
End Sub
The results are "1.txt,12.txt,11.txt..."
but I just want the results is" 1.txt"
help me!
thank you!
With Application.FileSearch
.LookIn = "C:\"
.FileName = "1.txt"
If .Execute > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With
End Sub
The results are "1.txt,12.txt,11.txt..."
but I just want the results is" 1.txt"
help me!
thank you!