+ Reply to Thread
Results 1 to 3 of 3

Correction in code

  1. #1
    Registered User
    Join Date
    05-04-2015
    Location
    ARMENIA
    MS-Off Ver
    office 2010
    Posts
    79

    Correction in code

    Hello Forum
    Hello every one
    Please if you can help me to solve this problem
    In my UserForm i have ComboBox1 and ComboBox2 and TextBox1
    ComboBox1 is powered by "JUNIOR" and "SENIOR"
    ComboBox2 is powerd by numbers ( 0-1-2-3-4-5 )
    I have 3 different cases :
    1 - If ComboBox1 = "JUNIOR" the value in TextBox1 will always without seeing ComboBox2 = ("00.00")
    2 - If ComboBox1 = "SENIOR" and ComboBox2 = 0 the value in TextBox1 = ("100.00")
    3 - If ComboBox1 = "SENIOR" and ComboBox2 > 0 (12345) the value in TextBox1 = ("400.00")
    when I make the choice in ComboBox 1 and I choose a number in ComboBox2 .. and always i change by ComboBox2 this code in my UserForm work perfectly
    My Problem is :
    For example I'm with the first case .. ComboBox1 "JUNIOR" and the number 3 in ComboBox2 ans value ("00.00") in TextBox1 ..Now at this moment suddenly
    if i change the choise in ComboBox1 to "SENIOR" ..the value in TextBox1 does not automatically change to ("400")
    I want the value in text automatically changes wherever I type
    Thank you in advance for help me
    Cordially
    MARTI MARTI
    USERFORM.xlsm

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Correction in code

    This is because there is no code in the ComboBox1. You need code in both. So let's use the same code for both, try this:
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 01-25-2016 at 12:34 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-04-2015
    Location
    ARMENIA
    MS-Off Ver
    office 2010
    Posts
    79

    Re: Correction in code

    Hiii JBeaucaire
    Thank you very very much for your help
    Thank you very very much for your best code
    That's exactly what I want to have
    Thank you
    Sincerely
    MARTI MARTI

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] This workbook code correction
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2013, 10:17 PM
  2. [SOLVED] need correction in code
    By ccsmith in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2012, 06:14 AM
  3. copy paste code correction
    By yiannis1925 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-06-2012, 10:19 AM
  4. Vba Code Correction
    By tromao in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2007, 05:55 PM
  5. [SOLVED] VBA Code Correction
    By RichIT in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2006, 12:10 PM
  6. [SOLVED] VBA Code Correction
    By RichIT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2006, 11:35 AM
  7. [SOLVED] Code Correction Need
    By Safi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2006, 01:10 PM

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