lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I created a form which has 3 text boxes and 4 cmd buttons. user will enter number in the first box and another number in the second box and click on +,-,*, / buttons and the result will be in box 3. The -,*, and / work fine but I noticed the + is not.
If user enter 1 in the firstbox and 2 in the secondbox and click on + then the 3rd box will show 12 not 3 ! why is that? and why other operations are ok except +. Thank you very much
I created a form which has 3 text boxes and 4 cmd buttons. user will enter number in the first box and another number in the second box and click on +,-,*, / buttons and the result will be in box 3. The -,*, and / work fine but I noticed the + is not.
If user enter 1 in the firstbox and 2 in the secondbox and click on + then the 3rd box will show 12 not 3 ! why is that? and why other operations are ok except +. Thank you very much
Code:
Private Sub plus_Click()
dim x as integer
x = first.Value + second.Value
result.Value = x
End Sub
Last edited: