![]() |
Displaying the result of a formula in a text box
I have a user form with combo and text boxes. Based on the values in three of the boxes I need the result of a formula to be displayed in a read only text box. The values selected in the 2 combo boxes determines which formula is used and the value in the text box is used in the formula E.g Combobox1 = 1111111 Combobox2 = Monthly Textbox1 = 27.35 Formulas 1111111 & Monthly = (Textbox1/1.05)/1.08)*0.3)*12) 2222222 & Monthly = (Textbox1/1.05)/1.08)*0.25)*12) 3333333 & Annual = (Textbox1/1.05)/1.08)*0.3) Result Testbox 2 = 86.83 Can anyone help me with this please as I'm not sure where to start Thanks Jules :confused: -- julesl ------------------------------------------------------------------------ julesl's Profile: http://www.excelforum.com/member.php...o&userid=25180 View this thread: http://www.excelforum.com/showthread...hreadid=386711 |
Displaying the result of a formula in a text box
If Combobox2.Value = "Monthly" Then If Combobox1.Value = "1111111" Then Textbox1.Text = CDbl(Textbox1.Text) / 1.05 / 1.08 * 0.3 * 12 ElseIf Combobox1.Value = "222222" Then Textbox1.Text = CDbl(Textbox1.Text) / 1.05 / 1.08 * 0.25 * 12 End If ElseIf Combobox2.Value = "Annual" And _ Combobox1.Value = "333333" Then Textbox1.Text = CDbl(Textbox1.Text) / 1.05 / 1.08 * 0.3 End If -- HTH Bob Phillips "julesl" wrote in message ... I have a user form with combo and text boxes. Based on the values in three of the boxes I need the result of a formula to be displayed in a read only text box. The values selected in the 2 combo boxes determines which formula is used and the value in the text box is used in the formula E.g Combobox1 = 1111111 Combobox2 = Monthly Textbox1 = 27.35 Formulas 1111111 & Monthly = (Textbox1/1.05)/1.08)*0.3)*12) 2222222 & Monthly = (Textbox1/1.05)/1.08)*0.25)*12) 3333333 & Annual = (Textbox1/1.05)/1.08)*0.3) Result Testbox 2 = 86.83 Can anyone help me with this please as I'm not sure where to start Thanks Jules :confused: -- julesl ------------------------------------------------------------------------ julesl's Profile: http://www.excelforum.com/member.php...o&userid=25180 View this thread: http://www.excelforum.com/showthread...hreadid=386711 |
All times are GMT +1. The time now is 06:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com