VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



To make a textbox to enter numeric value only

by priya (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 4th March 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

To make a textbox to enter numeric value only

Rate To make a textbox to enter numeric value only



Private sub text1_keypress(KeyAscii As Integer)
     if KeyAscii >= vbKey0 And KeyAscii <= vbKey9 Or KeyAscii = 8 Then
       Exit Sub
     Else
        KeyAscii = 0
        MsgBox " Only Numeric Value ", vbExclamation, "Number"
    End If
End sub

Download this snippet    Add to My Saved Code

To make a textbox to enter numeric value only Comments

No comments have been posted about To make a textbox to enter numeric value only. Why not be the first to post a comment about To make a textbox to enter numeric value only.

Post your comment

Subject:
Message:
0/1000 characters