Hi there, the function you are looking for is InStr, this returns the location of one string within another.
Below is an example:
CODE
Private Sub lookForString()
'input text
Const bodyString As String = "This is a search string"
'search string
Const searchString As String = "search"
'if string found (returns different to 0)
If InStr(1, bodyString, searchString) <> 0 Then
MsgBox "WOHOO!!!"
Else
MsgBox "DOH!!!"
End If
End Sub
To get the body string (the one you are looking in) you will need to get to grips with basic file handling - I have included a crude example with no error handling or anything just to get you going
CODE
Private Function readFile() As String
'a integer for the file handle
Dim fh As Integer
'the total text to be read
Dim totalText As String
'the current line being read
Dim line As String
'the file to be opened
Const file As String = "C:\Test.txt"
'assign a free file handle to the variable
fh = FreeFile
'ope the file for input to your program
Open file For Input As #fh
'repeat this code while not at the end of the file
Do While Not EOF(fh)
'put the next line of file into the line variable
Line Input #fh, line
'add this line to toal read input
totalText = totalText + line
Loop
'close file
Close #fh
'assign all read input to function to be returnd
readFile = totalText
End Function
Hopefully this will help a bit!