Limit a Memo Box

Castaway

Registered User.
Local time
Today, 23:22
Joined
Feb 26, 2001
Messages
17
Is there a way to limit a Memo box. Where if I want the Memo box to stop at 1500 characters and just stop typing like a text box, which limits you to 255 characters.
Thanks
 
I've not had a chance to test this, but I think in theory, you could add some code like:

If Len(Me.TextBox) >1500 Then
Me.TextBox = Left(Me.TextBox, 1500)
MsgBox "You cannot enter any more data here"
End If

to maybe the OnChange or OnKeyPress event of the text box, I'm not sure if it will work, but it's an approach that might be worth a try, although the code will be executed on each keypress in that text box, so it might make typing a bit painful.

Mike
 
Thanks.. I tried that but is there any other way of doing that.
 

Users who are viewing this thread

Back
Top Bottom