|
-
May 2nd, 2006, 06:57 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Chr(13)
Hi all,
I'm trying to get a program to input some text from a file into a text box. The code adds spacing for the various values, I.E.
Code:
Text1.text = Text1.text & Chr(13) & Var1 & Chr(13) & Var2
Etc, etc. 13 should be the ASCII code for return, so it should add a return there. I've also tried Chr13 and chr 13, as well as Chr(10) which seems to be similar, all with no luck. Any advice?
Thanks,
Arby.
EDIT: "Text1.text" is a multi-line textbox. Interestingly, I put the following code on a little text-program which I was testing the code on:
Code:
Private Sub Command1_Click()
Text1.Text = Chr13 & "-" & Chr13 & "-" & Chr(13) & Chr(50)
End Sub
What appeared in the textbox was:
--2
indicating that it *IS* picking up the Chr(Num) code. I wonder why 13 and 10 aren't working?
Last edited by BubbleLife; May 2nd, 2006 at 07:02 PM.
-
May 2nd, 2006, 07:01 PM
#2
Hyperactive Member
Re: Chr(13)
if you are trying to go to the next line try vbcrlf.
-
May 2nd, 2006, 07:01 PM
#3
Member
Re: Chr(13)
I have always used vbcrlf as a carriage return + linefeed.. chr(13) has never worked well for me in a text box..
so it would be like text1.text=text1.text & vbcrlf & .....
-
May 2nd, 2006, 07:04 PM
#4
Thread Starter
Addicted Member
Re: Chr(13)
Whoo! It works, thank you people ^__^
-
May 2nd, 2006, 07:21 PM
#5
Hyperactive Member
Re: [RESOLVED] Chr(13)
I normally use vbcrlf, but I think chr(10) & chr(13) have to be used together. One is line break, and the other is carriage return, if I remember correctly.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|