|
-
May 24th, 2011, 12:30 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] How to count characters when user type in textbox and display it in label ?
Hi all i got a textbox that user types a name. I want some how show the number of characters shown in label during user typing and warn him if he exceed for example 10 characters or disable typing.could any one show me how this can done.
-
May 24th, 2011, 02:13 AM
#2
Re: How to count characters when user type in textbox and display it in label ?
You can set the max count on your textbox to 10.
Or use. len(textbox1.text) to do a char count
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
May 24th, 2011, 04:44 AM
#3
Thread Starter
Frenzied Member
Re: How to count characters when user type in textbox and display it in label ?
 Originally Posted by some1uk03
You can set the max count on your textbox to 10.
Or use. len(textbox1.text) to do a char count
Thanks for you reply .But how i can show the char count while user type in label ?
Code:
Private Sub Command1_Click()
Label1 = Len(Text1.Text)
End Sub
-
May 24th, 2011, 04:47 AM
#4
Re: How to count characters when user type in textbox and display it in label ?
Code:
Private Sub Text1_Change()
Label1.Caption = Len(Text1.Text)
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
|