|
-
May 12th, 2002, 03:41 PM
#1
Thread Starter
Hyperactive Member
multiline
how do i stop a multiline edit box from entering a cf/vbcrlf watever wen i press enter?
-
May 12th, 2002, 03:43 PM
#2
VB Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = IIf(KeyAscii = vbCrLf,0,KeyAscii)
End Sub
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
May 12th, 2002, 03:43 PM
#3
Hyperactive Member
edit box?
do you mean Textbox?
Visual Baisc 6 (SP5)
Windows Xp
-
May 12th, 2002, 03:47 PM
#4
Thread Starter
Hyperactive Member
that gives me a type mismatch m8
-
May 12th, 2002, 03:49 PM
#5
Originally posted by adzzzz
that gives me a type mismatch m8
Sorry, I keep forgetting that vbCrLf is the actual character(s), not the number . Try replacing vbCrLf with vbKeyReturn.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
May 12th, 2002, 04:48 PM
#6
Frenzied Member
VB Code:
Private Sub Text1_Change()
Text1.Text = Replace(Text1.Text, vbNewLine, "")
End Sub
This
help?
-
May 12th, 2002, 05:36 PM
#7
Try
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then KeyAscii = 0
End Sub
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
|