+ Reply to Thread
Results 1 to 4 of 4

combobox linked to textbox

  1. #1
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    204

    combobox linked to textbox

    I've got a userform for input of data. I've got a combobox that picks up employee names from sheet1 A1:A20. but as i need they're payroll number which is in B1:B20. how to i get the combobox to link the employee name in A1:A20 to his employee number in B1:B20 and add that number to a textbox on the userform ?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Use the Combobox ListIndex. remember it starts at 0, so you need to add1, 2 if you have a header row

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-27-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: combobox linked to textbox

    How can I do this from Sheet1 to Sheet2?
    Sheet1 Data:
    EmployeeName ID
    joe 22

    Sheet2 Data:
    select the employee name from the combo box and it will display the ID in the textbox.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: combobox linked to textbox

    bhangra,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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