Chr(10) and Chr(13) doesn't work 
Author Message
 Chr(10) and Chr(13) doesn't work

Hello !

I'm frustrated - why won't Chr(10) line up my input under each other in the
TextBox I've created ??!! The code goes something like this:

Do While i < 2
ReDim Preserve FillAr(i)
Name = InputBox("Give a name:")
FillAr(i) = Name
txtFill = txtFill & Name & " " & Chr(10) & Chr(13)
i = i + 1
Loop

This has worked for me a thousands time before. Why doesnt itwork now ??
Has it something to do with the formatting of the text box ??

Any help would be appreciated !!

Joergen Haukland
NORWAY



Fri, 26 Nov 1999 03:00:00 GMT  
 Chr(10) and Chr(13) doesn't work

You're going to feel silly, but you have the order backwards - and that makes
all the difference in the world:

   txtfil = txtfill & Name & Chr$(13) & Chr$(10)

HTH
Greg

Quote:

>Hello !

>I'm frustrated - why won't Chr(10) line up my input under each other in the
>TextBox I've created ??!! The code goes something like this:

>Do While i < 2
>ReDim Preserve FillAr(i)
>Name = InputBox("Give a name:")
>FillAr(i) = Name
>txtFill = txtFill & Name & " " & Chr(10) & Chr(13)
>i = i + 1
>Loop

>This has worked for me a thousands time before. Why doesnt itwork now ??
>Has it something to do with the formatting of the text box ??

>Any help would be appreciated !!

>Joergen Haukland
>NORWAY



Fri, 26 Nov 1999 03:00:00 GMT  
 Chr(10) and Chr(13) doesn't work

It's the other way around ... Chr(13) & Chr(10)
--
Peter Antypas
To reply via e-mail, remove the '==' symbol from my domain name



Quote:
> Hello !

> I'm frustrated - why won't Chr(10) line up my input under each other in
the
> TextBox I've created ??!! The code goes something like this:



Fri, 26 Nov 1999 03:00:00 GMT  
 Chr(10) and Chr(13) doesn't work

Is the MultiLine property of the text box set to true?

Peter Larsson



Sat, 27 Nov 1999 03:00:00 GMT  
 Chr(10) and Chr(13) doesn't work

Why not just use the VB constant vbCRLF????? (in VB 4)

___________________________________________
http://www.qni.com/~paulj/

"I can do all things through Him who gives me strength"  Phil. 4:13


Quote:

> It's the other way around ... Chr(13) & Chr(10)
> --
> Peter Antypas
> To reply via e-mail, remove the '==' symbol from my domain name



> > Hello !

> > I'm frustrated - why won't Chr(10) line up my input under each other in
> the
> > TextBox I've created ??!! The code goes something like this:



Sat, 27 Nov 1999 03:00:00 GMT  
 Chr(10) and Chr(13) doesn't work

This is a multi-part message in MIME format.

------=_NextPart_000_01BC75D4.ACA2D3C0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit



Quote:
> Hello !

> I'm frustrated - why won't Chr(10) line up my input under each other in
the
> TextBox I've created ??!! The code goes something like this:

> Do While i < 2
> ReDim Preserve FillAr(i)
> Name = InputBox("Give a name:")
> FillAr(i) = Name
> txtFill = txtFill & Name & " " & Chr(10) & Chr(13)
> i = i + 1
> Loop

> This has worked for me a thousands time before. Why doesnt itwork now ??
> Has it something to do with the formatting of the text box ??

> Any help would be appreciated !!

> Joergen Haukland
> NORWAY

Try replacing "chr(10) & chr(13)" with "vbCrLf"

------=_NextPart_000_01BC75D4.ACA2D3C0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<html><head></head><BODY bgcolor=3D"#FFFFFF"><p><font size=3D2 =
color=3D"#000000" face=3D"Arial"><br>Joergen Haukland &lt;<font =

color=3D"#000000">&gt; wrote in article &lt;<font =

color=3D"#000000">&gt;...<br>&gt; Hello !<br>&gt; <br>&gt; I'm =
frustrated - why won't Chr(10) line up my input under each other in =
the<br>&gt; TextBox I've created ??!! The code goes something like =
this:<br>&gt; <br>&gt; Do While i &lt; 2<br>&gt; ReDim Preserve =
FillAr(i)<br>&gt; Name =3D InputBox(&quot;Give a name:&quot;)<br>&gt; =
FillAr(i) =3D Name<br>&gt; txtFill =3D txtFill &amp; Name &amp; &quot; =
&quot; &amp; Chr(10) &amp; Chr(13)<br>&gt; i =3D i + 1<br>&gt; =
Loop<br>&gt; <br>&gt; This has worked for me a thousands time before. =
Why doesnt itwork now ??<br>&gt; Has it something to do with the =
formatting of the text box ??<br>&gt; <br>&gt; Any help would be =
appreciated !!<br>&gt; <br>&gt; Joergen Haukland<br>&gt; NORWAY<br>&gt; =
<br><br>Try replacing &quot;chr(10) &amp; chr(13)&quot; with =
&quot;vbCrLf&quot;<br><br><br></p>
</font></font></font></font></font></body></html>
------=_NextPart_000_01BC75D4.ACA2D3C0--



Sat, 27 Nov 1999 03:00:00 GMT  
 Chr(10) and Chr(13) doesn't work

Quote:
> I'm frustrated - why won't Chr(10) line up my input under each other in
the
> TextBox I've created ??!! The code goes something like this:

> Do While i < 2
> ReDim Preserve FillAr(i)
> Name = InputBox("Give a name:")
> FillAr(i) = Name
> txtFill = txtFill & Name & " " & Chr(10) & Chr(13)
> i = i + 1
> Loop

It has to be chr$(13) & chr$(10) in that order.

Lee



Sun, 28 Nov 1999 03:00:00 GMT  
 Chr(10) and Chr(13) doesn't work

vbCrLF will work.

The reason yours doesn't is because you hav it the wrong way around!

It should be Chr$(13) & Chr$(10) - Carriage Return (13), then Line Feed
(10).

Evangelos Mourmourakis
Sydney, Australia





Quote:
> Hello !

> I'm frustrated - why won't Chr(10) line up my input under each other in
the
> TextBox I've created ??!! The code goes something like this:

> Do While i < 2
> ReDim Preserve FillAr(i)
> Name = InputBox("Give a name:")
> FillAr(i) = Name
> txtFill = txtFill & Name & " " & Chr(10) & Chr(13)
> i = i + 1
> Loop

> This has worked for me a thousands time before. Why doesnt itwork now ??
> Has it something to do with the formatting of the text box ??

> Any help would be appreciated !!

> Joergen Haukland
> NORWAY

Try replacing "chr(10) & chr(13)" with "vbCrLf"

----------



Sun, 05 Dec 1999 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. chr(10) and chr(13) in memofield gives |

2. Chr(10) & Chr(13)

3. INPUT OR READ TO STRIP CHR(10) AND CHR(13)

4. What is chr$(13) + chr$(10)

5. vbCRLF = chr(13) + chr(10)

6. Chr(13) doesn't create paragraph

7. is carriage return chr(13) or chr(32)

8. No Sentences in Title?! / No Chr(10) or Chr(13) in titles!!!

9. Global Const CR = chr$(13) + chr$(10) uh oh!?

10. chr(13) & chr(10) in a text box

11. Chr(10) not working?

12. what's the difference...(chr(13)) and vbCr

 

 
Powered by phpBB® Forum Software