+ Reply to Thread
Results 1 to 12 of 12

Userform textbox value based on combobox selection

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Userform textbox value based on combobox selection

    Hi
    have a userform2.
    There is combobox7 and next to it is textbox4.
    In sheet named sheet5, in range G5:G600 there are names and H5:H600 their staff numbers.
    I am trying to get staff number in textbox4 based on what I select in combobox.
    I am getting an error on following code.

    Please Login or Register  to view this content.
    Error is ' Unable to get the VLOOKUP property of the worksheet function class'
    Any help please

    Kind regards

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform textbox value based on combobox selection

    How have you populated the combobox?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Userform textbox value based on combobox selection

    Hi Norie,
    I have populated combobox by entering Row source ( Name List)
    Kind regards

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Userform textbox value based on combobox selection

    Hi KK1234,
    maybe so
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Userform textbox value based on combobox selection

    Hi Norie,
    Thanks again. But it does not work. The same error appears.
    Apology
    Kind Regards

  6. #6
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Userform textbox value based on combobox selection

    Hi Nilem,
    Apology,
    The same error appears.
    Sorry
    Kind regards

  7. #7
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Userform textbox value based on combobox selection

    Could you please attach a sample file, where the error occurs

  8. #8
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Userform textbox value based on combobox selection

    OK will do

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform textbox value based on combobox selection

    Eh, my question from post #2 didn't work?

  10. #10
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Userform textbox value based on combobox selection

    Hi Norie,
    Apology.
    I made a mistake.
    I wanted to respond to Nilem and by mistake I replied to you.
    I am still trying hard.
    Getting a sample book will take a day as I have to delete many things before I post sample.
    Kind regards

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform textbox value based on combobox selection

    No problem.

  12. #12
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Userform textbox value based on combobox selection

    Hi all,
    I have found an easy way of doing it.
    Instead of having a dependent text box with combobox, I have created another column in sheet where it is copied and havev used VLOOK function formula to populate desired data.
    In this way I find it much easier to relate.
    Thanks all for your kind help.
    Helping selflessly , as you all do,, is a noble act and I have clicked * to thank you all.
    I am closing this one as a solution has been reached.
    Thanks again
    Kind regards

+ 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. Userform Combobox to populate based on selection in another combobox
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2014, 03:34 PM
  2. [SOLVED] Excel Userform: Populate other controls (i.e. textbox & combobox) based on combobox select
    By MileHigh_PhD in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 04:50 PM
  3. [SOLVED] Fill a cell via textbox on userform depending on combobox selection
    By Rhamilton2512 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-15-2012, 10:29 AM
  4. [SOLVED] How do I make a selection from a combobox on my VBA userform populate a textbox?
    By ChristianMba in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-16-2012, 01:08 PM
  5. 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