I recieve a message ( inetAWS ) and it contain a lot of ¦ caracter..
I must replace all the ¦ caracter by a <ENTER>
exemple:
inetAWS= "1¦2¦3¦4¦5"
after , in textbox 1:
1
2
3
4
5
How can I do this ??
Printable View
I recieve a message ( inetAWS ) and it contain a lot of ¦ caracter..
I must replace all the ¦ caracter by a <ENTER>
exemple:
inetAWS= "1¦2¦3¦4¦5"
after , in textbox 1:
1
2
3
4
5
How can I do this ??
Make that:
Text1.Text = Replace(Text1, "¦", VbCRLf)
Excuse me! The difference ppl? :mad:
VB constant names are not case sensitive!!!! :cool:
Eh, the difference is that, when you type VbCRLf, the R automatically get's lowercase, and that looks funny, hehe, therefore it's better to do Jops way
Actually i would just type vbcrlf, and watch it get capital so that i'm sure i didn't type it wrong, on the other hand you'll notice it is if you have option explicit
Damn those joints again, I thought it was an T
Damn hehe :) sorry for the problems, I should not smoke that lot...
Hey, I know see that Matthew has Edited his post, so maybe I'm not that crazy after all :)
[Edited by Jop on 08-31-2000 at 09:29 AM]
If you don't have VB6, here is the VB5 equv.
Code:Function Replace(sIn As String, sFind As String, sReplace As String, Optional nStart As Long = 1, Optional nCount As Long = -1, Optional bCompare As VbCompareMethod = vbBinaryCompare) As String
Dim nC As Long, nPos As Integer, sOut As String
sOut = sIn
nPos = InStr(nStart, sOut, sFind, bCompare)
If nPos = 0 Then GoTo EndFn:
Do
nC = nC + 1
sOut = Left(sOut, nPos - 1) & sReplace & _
Mid(sOut, nPos + Len(sFind))
If nCount <> -1 And nC >= nCount Then Exit Do
nPos = InStr(nStart, sOut, sFind, bCompare)
Loop While nPos > 0
EndFn:
Replace = sOut
End Function
If you saw this in the textbox, "1¦2¦3¦4¦5" , maybe you just forgot to set the multiline property to true.
d. Paulson, he's getting a response from a remote server, and the server uses | to seperate the string, and he's parsing it do different lines, but I think he'll work it out now with all the split functions!
Forgive me, I'm sorry. I'm new to VB 6.0, just learning, I think I'll go learn some more before answering a VB 6.0 question.
Really sorry about that :rolleyes:.
I'm sure there was a faster function probably named myReplace, and i'm almost sure somone is going to post it :)
I would if wasn't using this slow comp which usually crashes when you at least want it to.