Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
This demonstrates how to limit a text box to a cer...
Author:
Alex
E-mail:
Click to e-mail author
Submitted:
2/14/2001
Version:
VB5
Compatibility:
VB5, VB6
Category:
Controls
Views:
8943
This demonstrates how to limit a text box to a certain amount of characters so once the user enters 8 characters, the text box is disabled. The number of characters can be altered.
Declarations:
Dim strText As String
Code:
'Create a text box on the form Sub Text1_KeyPress(KeyAscii As Integer) strText = Text1.Text If Len(strText) = 8 Then Text1.Enabled = False End If End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement