ComboBox with complicated problem

  • Hello OZGRID
    Hello evey one
    Please if you can help me to resolve this problem .. I tried to this file few codes .. but believe me I'm really tired and I have not succeded ..
    1 - In this UserForm1..OptionButton1 for "single" and OptionButton2 for "married"
    2 - In the second case OptionButton2 "married" I have several problem.. please if you can help me :
    My problems is with ComboBox4 ..i want if i choose number of children over 10 years in ComboBox4 will be apperas the result in TextBox23
    Number of children aged over 10 years always multiplied by the value of TextBox26 ..
    TextBox23 = ComboBox4 * 70 ( 70 = TextBox26)
    And After : TextBox24 = TextBox22 + TextBox23
    Thank you in advance for help me
    Sincerely
    MARTI MARTI
    forum.ozgrid.com/index.php?attachment/67877/

  • Re: ComboBox with complicated problem


    Hi Marti,


    You could test the following :

    Code
    Private Sub ComboBox4_Change()
    TextBox23.Value = ComboBox4.Value * TextBox26
    TextBox24.Value = TextBox22.Value + TextBox23.Value
    End Sub


    HTH

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: ComboBox with complicated problem


    Hello Marti,


    A second test ...

    Code
    Private Sub ComboBox4_Change()
        TextBox23.Value = ComboBox4.Value * CLng(TextBox26.Value)
        TextBox24.Value = CLng(TextBox22.Value) + CLng(TextBox23.Value)
    End Sub


    HTH

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: ComboBox with complicated problem


    Hello again,


    Following an excellent remark from cytop, to be on the safe side, you should test:

    Code
    Private Sub ComboBox4_Change() 
        TextBox23.Value = Val(ComboBox4.Value) * Val(TextBox26.Value) 
        TextBox24.Value = Val(TextBox22.Value) + Val(TextBox23.Value) 
    End Sub


    HTH

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: ComboBox with complicated problem


    Glad you could fix your problem ...:smile:


    Happy New Year to you ...


    Excellente Année 2016 :wink:

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!