howdy folks
please am working on an Annual Crop Cashflow Calculator like an Excel
i have 3 text boxes.
textbox22 textbox31 and textbox71
if i multiply textbox22 by textbox31 it shows in textbox71
but the problem is i need an event jus like excel after calculating and user goes back to empty either textbox31 or textbox22 the answer in texbox71 should be empty...
but with what i have here d previous answer will still be there until user inputs another entry
solution please
below is my code
Private Sub TextBox71_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox22.TextChanged, TextBox31.TextChanged
If String.IsNullOrEmpty(TextBox22.Text) OrElse String.IsNullOrEmpty(TextBox31.Text) Then Exit Sub
If Not IsNumeric(TextBox22.Text) OrElse Not IsNumeric(TextBox31.Text) Then Exit Sub
TextBox71.Text = CDbl(TextBox22.Text) * CDbl(TextBox31.Text)
End Sub