Welcome to Dream.In.Code
Become a VB Expert!

Join 137,262 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,507 people online right now. Registration is fast and FREE... Join Now!




limiting the value of textbox input

 
Reply to this topicStart new topic

limiting the value of textbox input

babbles
29 Nov, 2006 - 05:49 PM
Post #1

New D.I.C Head
*

Joined: 28 Nov, 2006
Posts: 12


My Contributions
hey...I am just new in visual basic programming. I have this problem about the textbox. i want to limit the input of numbers in visual basic by 5 . The user can only input 5 characters and if he press more than 5 characters he will go directly to the next textbox. Thanks...
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Limiting The Value Of Textbox Input
29 Nov, 2006 - 07:14 PM
Post #2

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 6,985



Thanked: 44 times
Dream Kudos: 500
Expert In: C#, VB.NET, Java

My Contributions
You can do that easily by setting the MaxLength property of the textbox to 5, by default it is 32767 total characters. You can also set the property using the designer by selecting the textbox and looking in the properties window for MaxLength and changing the property to 5.

Example:
CODE

Me.TextBox1.MaxLength = 5

User is offlineProfile CardPM
+Quote Post

babbles
RE: Limiting The Value Of Textbox Input
29 Nov, 2006 - 10:01 PM
Post #3

New D.I.C Head
*

Joined: 28 Nov, 2006
Posts: 12


My Contributions
QUOTE(jayman9 @ 29 Nov, 2006 - 08:14 PM) *

You can do that easily by setting the MaxLength property of the textbox to 5, by default it is 32767 total characters. You can also set the property using the designer by selecting the textbox and looking in the properties window for MaxLength and changing the property to 5.

Example:
CODE

Me.TextBox1.MaxLength = 5




wow..thanks....
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/4/08 07:06PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month