TextBox question
Patrick,
You can use a RichTextBox instead, as it has more properties to play with.
Private Sub RichTextBox1_KeyDown(KeyCode As Integer, ByVal Shift As Integer)
With RichTextBox1
If .GetLineFromChar(Len(.Text)) MaxNumberOfLines-1 Then
MsgBox "That's enough"
KeyCode = 0
End If
End With
End Sub
NickHK
"Patrick Simonds" wrote in message
...
I need a TextBox which allows for multiple lines of text. Is there any way
to restrict the TextBox to only allow 3 lines of text?
|