jpamps
11-18-2006, 12:30 AM
hey guys,
how do i add lines of texts in a textbox then do a carriage return?
in other words, i have textbox1 and textbox2. when the user types something in textbox1 and press a button, it appears in textbox2. when the user does it again, the text(whatever the user inputs) appears under the first text in textbox2.
i have multiline set to true.
thanks
MikeJ
11-18-2006, 12:33 AM
Use the ampersand (the & character) to attach two string variables:
'The ampersand (&) denotes string concatenation
Text2.Text = SomeString & SomeOtherString
Just curious, what version of VB are you using?
jpamps
11-18-2006, 12:58 AM
Use the ampersand (the & character) to attach two string variables:
'The ampersand (&) denotes string concatenation
Text2.Text = SomeString & SomeOtherString
Just curious, what version of VB are you using?
i'm using VB6. thanks... but i dont understand. sorry. i'm new to vb.
MikeJ
11-18-2006, 01:12 AM
Actually, it's way too late in the evening, I've missed something. The carriage return character in VB is vbCrLf. So, you would want to do:
'Should stick another line underneath the ones already there
Text2.Text = Text2.Text & vbCrLf & Text1.Text
jpamps
11-18-2006, 01:30 AM
Actually, it's way too late in the evening, I've missed something. The carriage return character in VB is vbCrLf. So, you would want to do:
'Should stick another line underneath the ones already there
Text2.Text = Text2.Text & vbCrLf & Text1.Text
AWESOME!!! thanks man! works great!!!