TO restrict the text box to numbers with single decimal point
TO restrict the text box to numbers with single decimal point
API Declarations
dim f,j as integer
Rate TO restrict the text box to numbers with single decimal point
(1(1 Vote))
If Len(Trim(Text1)) = 0 Then
f = 0
End If
For j = 1 To Len(Trim(Text1))
d = Mid(Text1, j, 1)
If d = "." Then
f = f + 1
Exit For
Else
f = 0
End If
Next
If Chr(KeyAscii) = vbBack Then Exit Sub
If KeyAscii = 46 And f = 0 Then Exit Sub
If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
KeyAscii = 0
End If
End sub
TO restrict the text box to numbers with single decimal point Comments
No comments yet — be the first to post one!
Post a Comment