Hi, I have a Textbox that I want to force the user to type in a number. My validation code is not stoping the user from entering in alpha characters. As soon as I type in a alpha character I get an error. The debugger goes to the code right after the "Exit Sub" line. It appears that it is continuing to run the code when I would think it would be exiting the routine. Hoping someone can tell me what I'm doing wrong. Thanks in advance, Jody
Private Sub TextBoxTargetCFMbuIn_Change()
'Validation
If (Not IsNumeric(TextBoxTargetCFMbuIn.Value)) And Len(TextBoxTargetCFMbuIn.Value) > 0 Then
Me.TextBoxTargetCFMbuIn.Value = ""
Me.TextBoxTargetCFMbuIn.SetFocus
MsgBox "Numbers Only Please!"
End If
Exit Sub
Me.LabelCFMbuHolder.Caption = Application.Text((Me.TextBoxTargetCFMbuFt.Value / Me.TextBoxTargetCFMbuIn.Value), "##.##")
End Sub
Bookmarks