I have the following code behind a textbox. I expect it to complain if the number enter is greater than 999.99, yet I can add 345566 and it gets accepted. What am I missing?
Code:
Private Sub EntryBox12_AfterUpdate() 'Start Mile Marker
If EntryBox12.value <> "" Then
With EntryBox12
If IsNumeric(.Text) = False Then
.Text = "Enter Number"
MsgBox "Enter a number.", vbExclamation
Exit Sub
Else
.value = Format(EntryBox12.value, "##0.0")
End If
End With
End If
End Sub