Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have 3 textboxes, and need some help....textbox1 is a input box textbox2 is a generated number box and textbox3 is a total box. I nee some help making textbox3 work. IE. Textbox1.value = "$400.00" Textbox2.value = "$0.00" (running total) Textbox3.value = "0.00" (sum of textbox1 - textbox2) How do I tell textbox 3 to take the value from textbox1 and subtrac the value in textbox2 to give the total remaining in textbox3 -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you can dispense with the currency symbols and assuming the text boxes
are on a UserForm then you could use something like:- Private Sub TextBox1_Change() TextBox3 = Val(TextBox1) - Val(TextBox2) End Sub Private Sub TextBox2_Change() TextBox3 = Val(TextBox1) - Val(TextBox2) End Sub But you'll need to make sure (ie. error check or amend the code to deal with currency symbols) that users only enter valid numbers into the text boxes since the code converts the text into numbers. -- XL2002 Regards William "dok112 " wrote in message ... | Hello, | | I have 3 textboxes, and need some help....textbox1 is a input box, | textbox2 is a generated number box and textbox3 is a total box. I need | some help making textbox3 work. | | IE. | Textbox1.value = "$400.00" | Textbox2.value = "$0.00" (running total) | Textbox3.value = "0.00" (sum of textbox1 - textbox2) | | How do I tell textbox 3 to take the value from textbox1 and subtract | the value in textbox2 to give the total remaining in textbox3? | | | --- | Message posted from http://www.ExcelForum.com/ | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
TextBox Question | Excel Discussion (Misc queries) | |||
Textbox question | Excel Discussion (Misc queries) | |||
Textbox question | Excel Discussion (Misc queries) | |||
Textbox question? | Excel Discussion (Misc queries) | |||
Textbox question 2 | Excel Programming |