+ Reply to Thread
Results 1 to 5 of 5

Userform with dynamic Combo boxes and text box fill

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

    Userform with dynamic Combo boxes and text box fill

    Good Day,
    I was hoping that somebody can assist me in VBA code for something simple. I am as green as they come with vba code.
    I have read many forum examples, but for cannot get the vba code sorted for my problem.
    I have attached a basic sample file.
    I would like to create a userform with 2 dynamic combo boxes and a text box. (Later in my project I will add more text boxes and perhaps combo boxes).
    I want combobox1 to list the items in column A, without duplication of the same name. I want combobox2 to update according what was selected in combobox1. Then I want the correct number associated with the option chosen in combobox2 to display in textbox1. I also want the option on the userform for the textbox, if I change the number in the textbox it should update the table and replace the original. Obviously it would be nice, before it is done a message box should appear asking the user if you are sure you want to replace the info. 
    I think the answer or the code is fairly simple. I have tried many different codes, but can get everything to come together.
    Any help would be highly appreciated!
    Thank you in advance!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Userform with dynamic Combo boxes and text box fill

    See if this can be of use.

    Regards

    JRidge
    Attached Files Attached Files

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

    Re: Userform with dynamic Combo boxes and text box fill

    Morning JRidge,

    Thanks a million, this is perfect to compile the combo box and the text box!

    I can use this and will definitely learn from it to adapt my current project accordingly.

    Do you know how I should add the code for the text box to update the table column if I enter a different number in the text box that originally was displayed?

    Thanks!

    Kind Regards,

    Ray
    Last edited by Raylou; 10-31-2014 at 01:44 AM.

  4. #4
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Userform with dynamic Combo boxes and text box fill

    Maybe something like:

    Regards

    JRidge
    Attached Files Attached Files

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

    Re: Userform with dynamic Combo boxes and text box fill

    Morning JRidge,

    Thanks for your reply.

    This will help me a lot!

    Once again thanks for you response.

    Just a last stupid question, how would I adapt the code if I want column B in ComboBox1, and column C in ComboBox2, and the value or text in Column 4 in textBox1?

    Thanks!

    Kind Regards,
    Ray
    Last edited by Raylou; 11-04-2014 at 02:02 AM.

+ 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] Clear all text boxes-combo boxes in a userform.
    By MariaPap in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2014, 11:16 AM
  2. [SOLVED] Help with code for userform text boxes, combo boxes and excel
    By innerise in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-20-2014, 09:07 AM
  3. Userform with dynamic combo boxes and autofilters
    By alfordtp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2014, 10:29 PM
  4. Using the If function to set parameters on Text and Combo boxes on a userform
    By jtemp57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-14-2014, 11:42 AM
  5. [SOLVED] Adding dynamic named ranges to combo boxes in userform
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2013, 09:45 AM

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