i have this code:
valor = InStr(inline, "P" Or InStr(inline, "S"
If valor = 1 Then
Open Text2.Text & "\" & nomefichtxt For Append As #2
Print #2, inline
Close #2
End If
but he only passes me the strings that begin with S, Why?
Instr function returns the position within the target string were the substring exists.
You should modify it as
valor=0
valor = InStr(inline, "P" Or InStr(inline, "S"
If valor <> 0 Then
Open Text2.Text & "\" & nomefichtxt For Append As #2
Print #2, inline
Close #2
End If
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.