LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum numbers in userform


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 ?


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=486630

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Max numbers of characters in userform textbox and cell N E Body Excel Programming 4 June 27th 05 06:25 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM
add numbers in textboxes on userform KimberlyC Excel Programming 5 September 18th 03 06:15 AM


All times are GMT +1. The time now is 02:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"