CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2000
    Location
    Thailand
    Posts
    5

    Find words in file

    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"



  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Find words in file

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured