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
4 Years
Discussion Span
Last Post by JorgeM

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

Edited by JorgeM

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.