This is not a homework assignment, but just practicing with other projects. I do not have any errors, but when I run the application it will not calculate for me. My error box pops up and says that i must enter a value, even though I already have. I don't think it is recognizing my radiobutton If's and IfElse's. Can someone point me in the right direction, please?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim doublePurchaseAmount As Double
Dim DelMar As Double
Dim LaJolla As Double
Dim TaxAmount As Double
Dim doubleTotalBill As Double
Dim doubleTax As Double
doublePurchaseAmount = CDbl(PurchaseAmount.Text)
doubleTotalBill = CDbl(TotalBill.Text)
' Equation
If DelMar Then
doubleTax = 1.0725
ElseIf LaJolla Then
doubleTax = 1.0775
ElseIf DelMar Then
doubleTax = 1.075
End If
doubleTotalBill = (PurchaseAmount.Text * doubleTax)
TotalBill.Text = FormatCurrency(doubleTotalBill)
'Catches errors and shows ErrorMessage box
Catch ex As Exception
MsgBox("You Must Type A Numeric Value!")
End Try
End Sub
Bookmarks