Opticknerve
New member
- Joined
- Jun 3, 2014
- Messages
- 3
- Programming Experience
- Beginner
Hey Guys im still new to programming....
Here is my code
I want to add the value of tbVal3 and tbVal6 into tbVal7. Instead of getting 10 i get 91.
Here is my code
Public Class Form1 Private Sub btnDivide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDivide.Click Dim Val1, Val2, Val3 As Integer Val1 = System.Convert.ToInt32(tbVal1.Text) Val2 = System.Convert.ToUInt32(tbVal2.Text) Val3 = Val1 / Val2 tbVal3.Text = System.Convert.ToString(Val3) End Sub Private Sub btnMulti_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMulti.Click Dim Val4, Val5, Val6 As Integer Val4 = System.Convert.ToInt32(tbVal4.Text) Val5 = System.Convert.ToUInt32(tbVal5.Text) Val6 = Val4 * Val5 tbVal6.Text = System.Convert.ToString(Val6) End Sub Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click tbVal7.Text = tbVal3.Text + tbVal6.Text End Sub End Class
I want to add the value of tbVal3 and tbVal6 into tbVal7. Instead of getting 10 i get 91.
Last edited by a moderator: