Private Sub Command1_Click
Dim s As String, ch As String, sum As Integer
Dim fh As Integer
s = Text1.Text: fh = 1: p = 0: sum=0
For i = 1 To Len(s)
ch = Mid(s, i, 1)
If ch >= "0" And ch <= "9" Then
p =
Else
sum =
p = 0
If ch = "-" Then
fh = -1
ElseIf ch = "+" Then
fh = 1
End If
End If
Next i
Label1.Caption = Str(sum)
End Sub