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