Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Mar 20, 2001

Restrict a Textbox to Accept Only Numbers


Sometimes we may need to restrict users from entering anything besides numbers in a textbox. The following code can achieve this:
 
Option Explicit
Private strClipboardText As String

Private Sub txtNumberBox_KeyPress(KeyAscii As Integer)
    If (KeyAscii <= Asc(
Mitesh Budhabhatti
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap