Sub txtTest_FocusChanged (HasFocus AsBoolean)
If IsNumber(txtTest.Text) Then
If HasFocus=False Then
' txtTest.Text=NumberFormat(txtTest.Text,0,3) ' you can use this line as an alternative
txtTest.Text=NumberFormat2(txtTest.Text,0,3,3,False)
End If
End If
End Sub
EDIT: I added the first if statement to avoid crash if box is left blank after lost focus
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.