+ Reply to Thread
Results 1 to 5 of 5

Formating and updatingTextBoxes once an item has been selected in a ComboBox

  1. #1
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Formating and updatingTextBoxes once an item has been selected in a ComboBox

    Good Day,

    I hope someone can help me. I know very very little about vba.

    As per my example, when I select a name in my ComboBox1, and the name exist in the list on sheet2, I want the Lid no. (TextBox2) be filled in with the appropriate number which match the name selected. Also if the name that exist is "Komiteelid" (as per the list) then the background colour of the Lid no. (TextBox2) must change to red and the text in the ComboBox1 must also change to red.

    If the name does not exit in the list which is typed in, I would like the Lid.no (TextBox2) change to the background colour blue and the text "GAS" must appear in the TextBox and the name (text) in the ComboBox1 change to blue.

    I thank you in advance!

    Raymond

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Formating and updatingTextBoxes once an item has been selected in a ComboBox

    2 codes in combobox
    1 activate by click, other by exit

    Please Login or Register  to view this content.
    Kind regards
    Leo

  3. #3
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Formating and updatingTextBoxes once an item has been selected in a ComboBox

    Hi Leo,

    Thank you for your help. With a few tweaks I got it working exactly as I needed.

    Thanks a million!

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Formating and updatingTextBoxes once an item has been selected in a ComboBox

    Hey Raylou,

    maybe good for other users you let us know witch tweaks you did


    Kind regards
    Leo
    Last edited by LeoTaxi; 08-04-2017 at 01:26 PM.

  5. #5
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Formating and updatingTextBoxes once an item has been selected in a ComboBox

    Hi Leo, sorry for the confusion. The code worked perfectly. The tweaks I was referring was just to change some of the preferences like adding something like the ComboBox having a forecolor of black and so. One again thank you for helping.

    Have a great weekend.

    Kind Regards,

    Ray

+ 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. selecting an item in combobox, the item does not get selected
    By AVM in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2014, 05:14 AM
  2. Replies: 3
    Last Post: 04-02-2013, 06:02 PM
  3. Combobox: How to determine the location of the selected item if combobox has rowsource
    By ahsanzafar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2012, 03:24 PM
  4. Value of selected item in Combobox
    By Boris88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2011, 09:56 AM
  5. How to create an already-selected item within a combobox
    By guarroman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2010, 12:38 PM
  6. ComboBox selected item
    By ballabali in forum Excel General
    Replies: 1
    Last Post: 12-15-2005, 11:55 AM
  7. [SOLVED] ComboBox fails when last item selected first
    By MBlake in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-28-2005, 03:05 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