Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If AllowanceTxtBox.Text <> "" Then
- Try
- Integer.Parse(AllowanceTxtBox.Text)
- Catch AllowanceError As Exception
- MessageBox.Show("You didn't input numbers for the allowance price!", "Data Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
- AllowanceTxtBox.Focus()
- AllowanceTxtBox.SelectAll()
- End Try
- Else
- AllowanceTxtBox.Text = "0"
- End If
- AmountDueTxtBox.Text = FormatCurrency(CStr(CDbl(TotalTxtBox.Text) - CDbl(AllowanceTxtBox.Text)))
- Catch NumberProblem As Exception
- MessageBox.Show("There was a problem with your numbers for the sales price.", "Data error", MessageBoxButtons.OK, MessageBoxIcon.Error)
- SalesPriceTxtBox.Focus()
- SalesPriceTxtBox.SelectAll()
- End Try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement