When I add this code to my under my command button:
MsgBox Text1.Text & " plus " & _
Text2.Text & " equals " & Text1.Text + Text2.Text
and use 5 for text1 and 5 for text2 the value given is 55. Have I missed something or am I losing my mind?
Nick
Printable View
When I add this code to my under my command button:
MsgBox Text1.Text & " plus " & _
Text2.Text & " equals " & Text1.Text + Text2.Text
and use 5 for text1 and 5 for text2 the value given is 55. Have I missed something or am I losing my mind?
Nick
yes you have missed something:rolleyes:. "+" can be used to concat strings, too. Try this :
VB Code:
MsgBox Text1.Text & " plus " & _ Text2.Text & " equals " & (Val(Text1.Text) + Val(Text2.Text))
:)
Thanks! I am just learning how to do VB. This threw me for a loop.
lol I think we all did that at one time