Just like the title says, the code in the attached file will validate the floating point numbers in a text box.
Usage
Create a form with a textbox, and insert the following into the form code:
Private Sub Form_Load()
Text1.Text = Empty
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
' Precision is 2 in this case
' Send the Precision Value same in both the Functions
Call ValidateNum(Text1, 2, KeyAscii)
End Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
Call ValidateDel(Text1, 2, KeyCode)
End Sub
Attachments
File | Uploaded | Size |
---|---|---|
966-20190825-145002-fpnumval.zip | 8/25/2019 2:50:02 PM | 1329 |