VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This small proram allow user to write only numeric values you call call this function in keypress e

by Ghazi Boujnah (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 16th April 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This small proram allow user to write only numeric values you call call this function in keypress event : Example : Keyascii=Numerique

Rate This small proram allow user to write only numeric values you call call this function in keypress e




Dim Tableau
If Caractere = 8 Then
    Numerique = Caractere
    Exit Function
End If
If IsNumeric(Chr(Caractere)) Or Chr(Caractere) = "." Then
If Chr(Caractere) = "." And Entier = True Then
    Tableau = Split(Texte, ".")
    If UBound(Tableau) = 1 Then
    Numerique = 0
    Exit Function
    End If
Else
    If Chr(Caractere) = "." Then Numerique = 0: Exit Function

End If
Else
Numerique = 0
Exit Function
End If
Numerique = Caractere
End Function


Download this snippet    Add to My Saved Code

This small proram allow user to write only numeric values you call call this function in keypress e Comments

No comments have been posted about This small proram allow user to write only numeric values you call call this function in keypress e. Why not be the first to post a comment about This small proram allow user to write only numeric values you call call this function in keypress e.

Post your comment

Subject:
Message:
0/1000 characters