I am trying to do some maths. inside my List Box but its not working.
As the Code stands its only Adding the newest item and outputting the total, and if i remove the item the Total goes to 0 with 3 or more items still in the List box
What i am looking for is the Program to keep updating the Total, as the user keeps adding in Items
As the Code stands its only Adding the newest item and outputting the total, and if i remove the item the Total goes to 0 with 3 or more items still in the List box
What i am looking for is the Program to keep updating the Total, as the user keeps adding in Items
VB.NET:
If Val(txtCount.Text) <= 0 Then
MessageBox.Show("Quantity must be Added!", "Error Message")
Else
Dim Total As Decimal
'Add how many is needed to Item Quantity
Total = intprice(ComboBox1.SelectedIndex) * Val(txtCount.Text)
Total = Total + decTax_RATE
'Outputting Items
ListBox1.Items.Add(ComboBox1.Text & " " & " " & txtCount.Text & " " & " " & " " & "@" & " " & "€" & intprice(ComboBox1.SelectedIndex).ToString & " " & "Ready To Ship")
End If