+ Reply to Thread
Results 1 to 2 of 2

Displaying the result of a formula in a text box

  1. #1
    Registered User
    Join Date
    07-13-2005
    Posts
    1

    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

  2. #2
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >
    >
    > --
    > julesl
    > ------------------------------------------------------------------------
    > julesl's Profile:

    http://www.excelforum.com/member.php...o&userid=25180
    > View this thread: http://www.excelforum.com/showthread...hreadid=386711
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1