I know this is probably very simple, but Im having a problem when trying to replace chr(13) in a string with a comma (",").
The string is coming from a text box set to multiline.
here is an example:
Dim x as integer
Dim a as string
Dim b as s tring
a =text1.text
for x= 1 to len(a)
if mid(a,x,1)<>chr(13) then b=b+mid(a,x,1)
if mid(a,x,1)=chr(13) then b=b+","
next x
open "c:\text.tst" for output as #1
write #1, b
close 1
If I look at the string b, I dont see any chr(13), but
if I open the file "c:\text.tst" with wordpad, the string is seperated into multiple lines, as if the chr(13) is still in there.
What the heck am I doing wrong? This should be fairly simple.
Thanks for your help.
The string is coming from a text box set to multiline.
here is an example:
Dim x as integer
Dim a as string
Dim b as s tring
a =text1.text
for x= 1 to len(a)
if mid(a,x,1)<>chr(13) then b=b+mid(a,x,1)
if mid(a,x,1)=chr(13) then b=b+","
next x
open "c:\text.tst" for output as #1
write #1, b
close 1
If I look at the string b, I dont see any chr(13), but
if I open the file "c:\text.tst" with wordpad, the string is seperated into multiple lines, as if the chr(13) is still in there.
What the heck am I doing wrong? This should be fairly simple.
Thanks for your help.