Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

enter keycode

Status
Not open for further replies.

lived

Programmer
Jun 6, 2000
39
CA
i'm triyng to show the text that i write in a text box in another textbox (with multiline = true) and i can't get to change of line when i put in the enter code like listed below please help me.


Private Sub parle_KeyDown(Keycode As Integer, Shift As Integer)
If Keycode = 13 Then
text.text = text.text + Chr$(13) + parle.text
parle.text = ""
end if
End Sub

miguel
migoul@hotmail.com
 
use the & instead of the +

use vbcrlf instaed of chr$(13)
 
To put on a new line you also need the line feed.

If Keycode = 13 Then
text.text = text.text & vbCRLF & parle.text
parle.text = ""
end if



You can also use vbNewline in place of the vbCRLF

David Paulson


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top