Hi, sorry this may not be the right forum.
I am a student and I have just started using visual basic 6 for my work. I have practised a few simple tasks in college and my task is to produce a program that when given 2 values it can; add them, subtract them, and multiply them. The values are entered into input boxes.
I started off with add, and from what I know so far so far have come up with this:
Private Sub cmdAdd_Click()
MsgBox ("the answer is ") & sum
Private Sub cmdEnter_Click()
Dim a As Integer
Dim b As Integer
Dim sum As Integer
InputBox ("Enter your value for A")
InputBox ("Enter your value for B")
sum = a + b
It doesn't work, the answe box (a label) just displays 0.
Can anyone tell me what I am missing?