Hey guys have a quick question.
I'm attempting to have some data validation done when the focus is set on a text box.
Short version is: when the user inputs there data in two previous textboxes a "BeforUpdate" event runs to update a third text box. The third textbox tabstop is set to false. In the forth textbox before the user is able to enter in data i need it to validate the data in the third textbox is useable data. useable data is the easy part anything >0. if the data in the third textbox is <0, null, or "" then i need it to reset the data in the first two textboxes and set the courser to the first textbox.
I'm looking for something like this but not sure how to set up the declarations to make it work.

'user has tabed out of second textbox into the "forth" text box;
'in the forth text box the validation would look like this (in some way)
If Me.DelayTimeBox.Value >= 0 Then Exit Sub
If Me.DelayTimeBox.Value = { <=0, or Null, or ""} Then
Set Me.DispatchBox.{Text or Value unsure which to use} = ""
Set Me.EnRouteBox.{Text or Value unsure which to use} = ""
Me.DispatchBox.SetFocus
End If

I've tried inputting that in some form or another in every place I can think of but it either causes the "BeforeUpates" to not work or i get nothing at all. I'll input what i have to make it (i hope) simpler to follow what I'm attempting to do.
I keep thinking it would go on a textbox focus event of some type but not sure where to start.
Here is what I have so far:
Private Sub DispatchBox_BeforeUpdate(ByVal cancel As MSForms.ReturnBoolean)
    If EnRouteBox = "" Then Exit Sub
On Error GoTo Thomas
        DelayTimeBox = XLMod(TimeValue(Format(EnRouteBox, "00\:00")) - TimeValue(Format(DispatchBox, "00\:00")), 1) * 24 * 60
Thomas:
On Error GoTo 0
End Sub
Private Sub EnRouteBox_BeforeUpdate(ByVal cancel As MSForms.ReturnBoolean)
    If DispatchBox = "" Then Exit Sub
On Error GoTo Thomas
        DelayTimeBox = XLMod(TimeValue(Format(EnRouteBox, "00\:00")) - TimeValue(Format(DispatchBox, "00\:00")), 1) * 24 * 60
Thomas:
On Error GoTo 0
End Sub
Public Function XLMod(a, b)
   XLMod = a - b * Int(a / b)
End Function
Private Sub DelayTimeBox_Change()
Me.DelayTimeBox.Value = Format(Me.DelayTimeBox.Value, "0")
On Error GoTo Thomas
    If Me.DelayTimeBox.Text > 15 Then
        Me.DelayTimeBox.BackColor = RGB(255, 199, 206)
            End If
    If Me.DelayTimeBox.Text <= 15 Then
        Me.DelayTimeBox.BackColor = RGB(204, 255, 229)
            End If
Thomas:
On Error GoTo 0
End Sub
Private Sub DispatchBox_Change()
    If DispatchBox = "" Then Exit Sub
    If DispatchBox <= 2359 Then Exit Sub
    If DispatchBox > 2359 Then
    MsgBox "Time entered is invalade", vbExclamation
        DispatchBox = ""
        DispatchBox.SetFocus
    End If
End Sub
Private Sub EnRouteBox_Change()
    If Me.EnRouteBox = "" Then Exit Sub
    If Me.EnRouteBox <= 2359 Then Exit Sub
    If Me.EnRouteBox > 2359 Then
    MsgBox "Time entered is invalade", vbExclamation
        Me.EnRouteBox = ""
        Me.EnRouteBox.SetFocus
    End If
End Sub
The Pirvate Sub Dispatch and EnRoute_Change() is in there to validate that a time of <= 2359 is entered if not than it kicks it out and makes you fix it. That works unless the user inputs a value of say 1199. Its in that case the "BeforeUpdate" is unable to do its math and leaves the DelayTimeBox empty. Its for those cases I need this second level of validation in the forth textbox. I know I said a quick question but it ended up being a little more involved than I thought. Any help or point in the right direction is greatly appreciated.