Hello there,
I am new to Visual Basic and am using Visual Basic 6.
I was wondering how to add two text box.
I have tried Text3.Text = Text1.Text + Text2.Text
but that did not work, it just joined the values.

Like if text1.text was equal to 1 and text2.text was equal to 2 it would give text3.text the value of 12.

Please help me out!!!
Who is Participating?
vbWayneConnect With a Mentor Commented:
text boxes are text by default
to perform math functions you need to change the text to integer or ...

text3.text = cint(text1. t) + cint(text2.text)
One way..

Text3 = Val(Text1) + Val(Text2)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.