Hello st3ven_J,
Sorry for the late response. If every header line begins with "CPN", you can change your Do loop to the following:
Code:
Do Until EOF(intInHandle)
Line Input #intInHandle, strInLine
If Left(strInLine, 3) = "CPN" Then
strHeader = Left(strInLine, 6)
End If
If strHeader = CPNTCS" Then
Print #intOutHandle, strInLine
End If
Loop
You'll need a new strHeader variable and will no longer need the strOutLine variable.
Regards,
Ax