-
how can I use a split command for that:
ampersand = InStr(1, InetAWS, "¦")
If ampersand <> 0 Then
LINES = Mid(InetAWS, 1, ampersand - 1) & vbCrLf & InetAWS & Mid(InetAWS, ampersand + 1, Len(InetAWS) - ampersand + 1)
End If
( Each ¦ in the variable inetAWS will be replace by <ENTER>)
but this ismy problem:
exemple:
before
1¦2¦3¦4
after
1
2¦3¦4
only the first symbol is replaced ..
How can I fix this bug ??
-
Code:
Dim i as Integer
Dim Result as Variant ' MUST be a variant
Result = Split(Source,"|")
For i = 0 to UBound(Result)
MsgBox Result(i)
Next i
-
I just read your question again and you don't want the Split command at all!!!
You want to use the replace command
Code:
LINE = Replace(InetAWS,"|",vbCRLF)
That replaces all instances of the pipe character with a Carriage Return and Line Feed.