Here is another way to do it. First, use this code to read the entire file
into a String variable (named TotalFile for this example), Split the text
into individual Lines, find the line you are interested in, Join the
individual lines into a single text string and save it back out...
Dim X As Long
Dim FileNum As Long
Dim TotalFile As String
Dim Lines() As String
FileNum = FreeFile
Open "C:\TEMP\Test.txt" For Binary As #FileNum
TotalFile = Space(LOF(FileNum))
Get #FileNum, , TotalFile
Close #FileNum
Lines = Split(TotalFile, vbNewLine)
For X = 0 To UBound(Lines)
If Lines(X) = <<text you are interested in>> Then
Lines(X) = Lines(X) & "<<text to add to end of line>>"
End If
Next
TotalFile = Join(Lines, vbNewLine)
FileNum = FreeFile
Open "C:\TEMP\Test.txt" For Output As #FileNum
Print #FileNum, TotalFile
Close #FileNum
Fill in the parts unique to your program (the Filename with Path, and the
info inside the For-Next loop.
Rick