ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Alternatives To: FileSearch with TextOrProperty (Problem FindingPhrase Such As "An apple a day") (https://www.excelbanter.com/excel-programming/417901-alternatives-filesearch-textorproperty-problem-findingphrase-such-apple-day.html)

ChristopherL

Alternatives To: FileSearch with TextOrProperty (Problem FindingPhrase Such As "An apple a day")
 
Hello,

I cannot seem to be able to use FileSearch to find files containing
"An apple a day" without also retrieving files containing "A big red
apple a day". What are my alternatives to be able to do this fast?

This is what my code looks like:

With Application.FileSearch
.NewSearch
.LookIn = Folder
.SearchSubFolders = False
.TextOrProperty = "An apple a day"
.filename = "*.txt*"
.MatchTextExactly = True

.Execute

Msgbox .FoundFiles.Count

End With

Thanks for any suggestions,
Chris


All times are GMT +1. The time now is 10:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com