+ Reply to Thread
Results 1 to 5 of 5

Auto Filling a text box based on information in a different text box

  1. #1
    Registered User
    Join Date
    03-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    63

    Auto Filling a text box based on information in a different text box

    Good Day again,

    I've got another fairly simple problem that I can't figure out for some reason.

    I've got a userform that as multiple text boxes in it. One of those text boxes is Employee ID, and another one is employee name. I was wondering if it was possible to have the employee name box auto fill based on the data entered in the employee id box. I think it is possible to do using the Sub EmpID_Afterupdate(), but I'm not sure of the code I would use to take the data from the EmpID box, use it to lookup the employee name, and then put that information in the employee name box.

    Any help would be greatly appreciated.

    Regards,
    Chris
    Last edited by Benisato; 02-27-2012 at 02:46 PM.

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Auto Filling a text box based on information in a different text box

    it is possible, just attache any workbook with dummy data, which presents your source data structure
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

  3. #3
    Registered User
    Join Date
    03-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    63

    Re: Auto Filling a text box based on information in a different text box

    The Data structure is as simple as possible. A worksheet with Employee number in Column A, Employee Name in column B. I just need to be able to put the employee number in the EmpID textbox, and then have it use that number find the corresponding name in column B, and then fill in the Employee Name textbox with the data from Column B

  4. #4
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Auto Filling a text box based on information in a different text box

    so let say you have
    text1 - employee name
    text2 - employee ID
    sheet1 - source sheet

    in event afterupdate of control text1
    place code
    Please Login or Register  to view this content.
    it would be better if you can attach any sample workbook

  5. #5
    Registered User
    Join Date
    03-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    63

    Re: Auto Filling a text box based on information in a different text box

    Thanks a lot. I got exactly what I needed from your demonstration.

    Much Appreciated.

    Chris

+ 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