H
helmekki
Hi there
i use userform to sum the entered numbers into the same userform
Code:
--------------------
Private Sub CommandButton1_Click()
If Label1.Caption = "" Then
Label1.Caption = TextBox1.Value
TextBox2.Value = TextBox1.Value
Else:
Label1.Caption = Label1.Caption & vbCr
Label1.Caption = Label1.Caption & TextBox1.Value
TextBox2.Value = TextBox2.Value + TextBox1.Value
End If
TextBox1.Value = ""
End Sub
--------------------
but this line:
Code:
--------------------
TextBox2.Value = TextBox2.Value + TextBox1.Value
--------------------
put the numeric values next to each other
i need to sum them insted ?
i use userform to sum the entered numbers into the same userform
Code:
--------------------
Private Sub CommandButton1_Click()
If Label1.Caption = "" Then
Label1.Caption = TextBox1.Value
TextBox2.Value = TextBox1.Value
Else:
Label1.Caption = Label1.Caption & vbCr
Label1.Caption = Label1.Caption & TextBox1.Value
TextBox2.Value = TextBox2.Value + TextBox1.Value
End If
TextBox1.Value = ""
End Sub
--------------------
but this line:
Code:
--------------------
TextBox2.Value = TextBox2.Value + TextBox1.Value
--------------------
put the numeric values next to each other
i need to sum them insted ?