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
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