Limit textbox to 255 characters

V

vqthomf

Hi I have a textbox that user types in a comment and I want to limit the
input to 255 characters. I am using code as below but when I try to remove
the extra characters I get an error can some help please.
TIA
Charles

Select Case Len(TextBox1.Value)
Case Is >= 255
MsgBox "You Have Reached The Input Limit Of 255 Characters"

Case Else
lblCounter1.Caption = "Characters remaining " & (255 -
Len(TextBox1.Value))
End Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top