-
I have to type a single number into the input box then you hit the plus key. This will make that number be added to whatever is in the display box. Then you type a new number in to the input box and hit the plus key again and now this new number will be added to what is in the display and the sum will again be put in the display box. For this one I have to use the case statement and the plus sign must not show up on the form.
-
Try this:
txtInputBox represents your input box.
txtDisplayBox represents your display box.
Code:
Private Sub txtInputBox_KeyPress(KeyAscii As Integer)
If Chr(KeyAscii) = "+" Then
KeyAscii = 0
txtDisplayBox.Text = Val(txtDisplayBox.Text) + Val(txtInputBox.Text)
txtInputBox.Text = ""
End If
End Sub
I hope this helps.
[Edited by Sc0rp on 09-25-2000 at 04:05 PM]