Hello,
The form i am doing takes from the user the item price, then it will calcuate the subtotal, tax, shipping, and total when the button is clicked. How can i update it so if the user adds another item it will update the subtotal, tax, and total when the button is clicked.
Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click
Dim dblItem As Double
Dim dblSub As Double
Dim dblTax As Double
Dim intShipping As Integer
Dim dblTotal As Double
Dim dblnewSub As Double
Dim dblnewTax As Double
Dim dblnewtotal As Double
Double.TryParse(txtItem.Text, dblItem)
dblSub = dblItem + dblSub
lblSub.Text = Convert.ToString(dblSub)
dblTax = dblSub * 0.03
lblTax.Text = Convert.ToString(dblTax)
intShipping = "15.00"
lblShipping.Text = Convert.ToString(intShipping)
dblTotal = dblSub + dblTax + intShipping
lblTotal.Text = Convert.ToString(dblTotal)
If dblTotal >= 100 Then
intShipping = "0.00"
lblShipping.Text = Convert.ToString(intShipping)
ElseIf dblTotal < 100 Then
intShipping = "15.00"
lblShipping.Text = Convert.ToString(intShipping)
End If