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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.