J
Joanne
I am using the following code on a simple user form to calculate some
customer charges. I am taking the value from the txt boxes to get the
calcs I need. It works well one time thru, but when I click the "Next"
button, it clears the txt boxes as expected, sets focust on txtCustMins,
but when I input into the txtCustMins, I don't get any calculations as I
tab thru.
Clearly I have something wrong here but I am pressed to know what it is.
I would appreciate any advice you have to offer to get this going.
Thanks a bunch
Joanne
Private Sub cmdDone_Click()
txtCustCharges.Value = ""
txtCustMins.Value = ""
txtNumStops.Value = ""
txtTruckerTime.Value = ""
txtTotalMinutes.Value = ""
Application.Quit
End Sub
Private Sub cmdNext_Click()
txtCustCharges.Value = ""
txtCustMins.Value = ""
txtCustMins.SetFocus
End Sub
Private Sub txtNumStops_AfterUpdate()
txtCustCharges.Value = (txtTotalMinutes.Value / txtNumStops.Value +
txtCustMins.Value) * 1.17
End Sub
Private Sub txtTruckerTime_Change()
txtTotalMinutes.Value = txtTruckerTime * 60
End Sub
customer charges. I am taking the value from the txt boxes to get the
calcs I need. It works well one time thru, but when I click the "Next"
button, it clears the txt boxes as expected, sets focust on txtCustMins,
but when I input into the txtCustMins, I don't get any calculations as I
tab thru.
Clearly I have something wrong here but I am pressed to know what it is.
I would appreciate any advice you have to offer to get this going.
Thanks a bunch
Joanne
Private Sub cmdDone_Click()
txtCustCharges.Value = ""
txtCustMins.Value = ""
txtNumStops.Value = ""
txtTruckerTime.Value = ""
txtTotalMinutes.Value = ""
Application.Quit
End Sub
Private Sub cmdNext_Click()
txtCustCharges.Value = ""
txtCustMins.Value = ""
txtCustMins.SetFocus
End Sub
Private Sub txtNumStops_AfterUpdate()
txtCustCharges.Value = (txtTotalMinutes.Value / txtNumStops.Value +
txtCustMins.Value) * 1.17
End Sub
Private Sub txtTruckerTime_Change()
txtTotalMinutes.Value = txtTruckerTime * 60
End Sub