1,105,352 Community Members

Total price Increment

Member Avatar
Newbie Poster
7 posts since Mar 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]

I have a different buttons for each item i have, each buttons has a function of which compute total price of item versus the quantity that have been entered in the textbox qty and summing all the total bill of all items to textbox3 or totalbilltext. but it seems that only value that appearing to the textbox3 is the (qtyprice) not the value of the totalbill+=qtyprice. T_T help.

 Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
        a = TextBox1.Text
        b = a * 2
        tb += b
        TextBox3.Text = tb

    End Sub

    Protected Sub Button2_Click(sender As Object, e As System.EventArgs) Handles Button2.Click
        a1 = TextBox2.Text
        b1 = a1 * 4
        tb += b1
        TextBox3.Text = tb
    End Sub
Member Avatar
IT Addict
6,381 posts since Dec 2011
Reputation Points: 567 [?]
Q&As Helped to Solve: 953 [?]
Skill Endorsements: 172 [?]

Then it appears that the value of tb is 0 before you add in the value of b.

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: