ufffffffffff !!!! man .... you guys are going to laugh .... but I have to ask this question because I've been trying to figure it out for more than 6 hours already.
I'm doing a application (for my class) that requires me to add a item that is keyed from a text box to a list box. I got that.
The problem is that when I'm trying to add(sum) the values in the list box to a label call lblSubTotal, the application just does not add.
My current code for the btnAdd is:
If someone can help me try to add(sum) the values to a label ... man .. I would be really in debt.
Thanks,
Eduardo Arias
I'm doing a application (for my class) that requires me to add a item that is keyed from a text box to a list box. I got that.
The problem is that when I'm trying to add(sum) the values in the list box to a label call lblSubTotal, the application just does not add.
My current code for the btnAdd is:
VB.NET:
PrivateSub btnAdd_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim ItemPrice AsDouble
Dim SubTotal AsDouble
Dim Sale AsDouble
Dim Count AsInteger
ItemPrice = CDbl(txtItemPrice.Text)
Sale = txtItemPrice.Text
SubTotal = SubTotal + ItemPrice
lblSubTotal.Text = SubTotal
lstSales.Items.Add(txtItemPrice.Text)
txtItemPrice.Text = ""
EndSub
Thanks,
Eduardo Arias
Last edited by a moderator: