+ Reply to Thread
Results 1 to 2 of 2

TextBox Entry based on Combobox Selection

  1. #1
    Registered User
    Join Date
    08-19-2012
    Location
    London, England
    MS-Off Ver
    Excel 2016 in Win 10
    Posts
    97

    TextBox Entry based on Combobox Selection

    Good morning All

    I have a sheet which contains data that I wish to call to a UserForm

    Column A - ID
    Column B - Full Name
    Column C - Title
    Column D - First Name
    Column E - Surname

    ETC ETC

    In UserForm1:

    TextBox 17 is to contain the ID (Column A) of the selection made from ComboBox3
    Combox 3 looks up the values in Column B
    TextBox18 is to contain the Title (Column C) of the selection made from ComboBox3
    TextBox1 is to contain the First Name (Column D) of the selection made from ComboBox3
    TextBox2 is to contain the Surname (Column E) of the selection made from ComboBox3

    etc etc to Column S

    The Spreadsheet contains headers which need to be ignored and I have expanded the Table Named [FullName B1:B100] which means there are many blanks cells currently.

    I have tried various ways of doing this from my web searches and none appear to work but I suspect I have done something horribly wrong

    Any help here greatly appreciated as usual

    Many thanks

    Derek

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: TextBox Entry based on Combobox Selection

    You are going down a blind alley

    It is far better to use columns 1 to 20 say for text boxes and columns 10 to say 30 for Comboboxes.

    Then you could do something like the attached userform.

    Please Login or Register  to view this content.

    You will have noticed that I use a short macro to call a subroutine whenever a text box is changed.

    This keeps my coding simple because I do all te complex coding in my Entry, Change, Keydown, Keyup subroutines and have simple calling subs for each textbox


    The attached macro will create all the macros for your textboxes.

    open the workbook and click on the button.

    The macro will create the macros for 100 textboxes, 300 macros in total
    Attached Files Attached Files
    Last edited by mehmetcik; 02-04-2016 at 02:50 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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] Textbox - populate with month name and values based on Combobox selection
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-02-2015, 08:09 AM
  2. Textbox to populate based on combobox selection
    By acroley1 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-11-2015, 04:12 PM
  3. [SOLVED] Textbox fill based on combobox selection
    By WimpieOosthuizen in forum Excel General
    Replies: 7
    Last Post: 05-23-2014, 04:55 AM
  4. Populate textbox based off ComboBox Selection
    By ladams41 in forum Excel General
    Replies: 1
    Last Post: 04-09-2014, 10:13 AM
  5. Populate TextBox based off ComboBox selection
    By ladams41 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 01:24 PM
  6. [SOLVED] Userform textbox value based on combobox selection
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-17-2014, 11:56 AM
  7. Filling Textbox based on Combobox selection
    By Borg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2009, 02:55 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