|
-
Mar 16th, 2000, 07:19 AM
#1
Thread Starter
New Member
It is very simple, I would like to add a line to a textbox that already contain lines.
I supposed it would be
Textbox.Text = "new line" & Chr(x) & Textbox.Text
but I haven't found it yet
-
Mar 16th, 2000, 07:30 AM
#2
Addicted Member
Hi there, try this.
Textbox.Text = vbCR & vbLF & Chr(x) & Textbox.Text
Hope this can help 'ya ...
-
Mar 16th, 2000, 12:46 PM
#3
Conquistador
try this:
Code:
Text1.Text = "Insertion Text" Chr(10) & Text1.Text
Say if Text1 contains "Hello", and you run the above code it will become
Insertion Text
Hello
ok 
-
Mar 16th, 2000, 01:18 PM
#4
Frenzied Member
da_silvy is ALMOST right...
Did you actually try your code, da_silvy? 
You need to add an ampersand (&) between "Insertion Text" and the newline character, and using Chr(10) won't work...it just puts a vertical bar in the text.
Try this:
Code:
Text1.Text = "Insertion Text" & vbNewLine & Text1.Text
These also work the same way:
Code:
Text1.Text = "Insertion Text" & vbCr & vbLf & Text1.Text
'...or...
Text1.Text = "Insertion Text" & vbCrLf & Text1.Text
'...or...
Text1.Text = "Insertion Text" & Chr(13) & Chr(10) & Text1.Text
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
|