How can I find some words in file?
Ex. I want to find "eat" in test.txt file.
If it's match "msgbox will show "OK"
If it's not match "msgbox will show "can't find"
Printable View
How can I find some words in file?
Ex. I want to find "eat" in test.txt file.
If it's match "msgbox will show "OK"
If it's not match "msgbox will show "can't find"
read the complete file into one string and use VB's Instr function to search for the occurrence of the search string within your file.