VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Validating numbers. Useful for entering the Amount in TextBox

by Sathyanarayanan.K (3 Submissions)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 13th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Validating numbers. Useful for entering the Amount in TextBox

Rate Validating numbers. Useful for entering the Amount in TextBox



If KeyAscii <> 8 Then
    If Not IsNumeric(Text1 & Chr$(KeyAscii) & "1") Then
        KeyAscii = 0
        Exit Sub
    End If
    If InStr(Text1, ".") > 0 And InStr(Text1, ".") < Len(Text1) - 1 Then
        KeyAscii = 0
    End If
  End If
End Sub

Download this snippet    Add to My Saved Code

Validating numbers. Useful for entering the Amount in TextBox Comments

No comments have been posted about Validating numbers. Useful for entering the Amount in TextBox. Why not be the first to post a comment about Validating numbers. Useful for entering the Amount in TextBox.

Post your comment

Subject:
Message:
0/1000 characters