Hi,

Once again I your need advice. I'm doing my first project and I want the numbers that the user puts in a text box to be stored and afterwards I can use these data to make some additions or substractions. The idea is that once the user writes the number in a text box and presses "Enter" this number will be stored and avalaible to do some simple mathematical operations.

I wrote this simple thing but it doesn't work. What is my mistake? Please help.

Option Explicit

Dim strTotal
Dim Stored
Dim Total

Private Sub Text1_KeyPrees(KeyAscii As Integer)

If KeyAscii = 13 Then
strTotal = Text1.Text
Stored = strTotal
Total = Total + Stored
End If

End Sub


Thanks in advance for your help,
Xenia Jones



------------------