this is your project so, I wont give you the entire source, but for my calc program I did...
Code:
Private Sub cmd1_Click()
If txtBox = "0" Then
txtBox = 1
Else
txtBox.Text = txtBox.Text & 1
End If
End Sub
now for the operand
Code:
Private Sub cmdDivide_Click()
Divide = txtBox
txtBox = ""
End Sub
and for equals
Code:
Private Sub cmdEquals_Click()
If Minus <> "" Then
txtBox = Val(Minus) - Val(txtBox)
ElseIf Plus <> "" Then
txtBox = Val(Plus) + Val(txtBox)
ElseIf Times <> "" Then
txtBox = Val(Times) * Val(txtBox)
ElseIf Divide <> "" Then
txtBox = Val(Divide) / Val(txtBox)
Else
MsgBox "please push an operand(+,-,*, or /)", vbCritical, "Error"
txtBox = ""
End If
End Sub
txtBox is where you enter the numbers and stuff
Plus
Minus
Divide
and
Times

are the vairables to store the first value of the operator....
after you click something like times, the textbox clears...