f = "c:\test.txt"
filenumber = FreeFile
Open f For Input As filenumber
a = Input(FileLen(f), filenumber)
Close filenumber
LookFor = LCase("SerialNo")
b = InStr(LCase(a), LookFor)
If b 0 Then
MsgBox Mid(a, b + Len(LookFor), 10)
End If
Mishell
"Fan924" a écrit dans le message de news:
...
How do I search text files for a certain word using a macro. I need to
look for the word "SerialNo" and return the following 10 characters. I
will be repeating this for hundreds of files. For now, how do I do it
for a single file. Excel 97