+ Reply to Thread
Results 1 to 11 of 11

Populate userform text boxes with dater from another sheet, dependant on list box selectio

  1. #1
    Registered User
    Join Date
    04-14-2015
    Location
    Spain
    MS-Off Ver
    office 2007
    Posts
    42

    Populate userform text boxes with dater from another sheet, dependant on list box selectio

    I would like to fill the text boxes on a Userform, with details from cells in another sheet. I have the select box populating with the "Customers" from the other sheet but I am having trouble working out tue "On click" code, to fill the text boxes with the data.

    Any help would be appreciated.
    Attached Files Attached Files

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

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    I would look at this for you.

    But you haven't even put a button on the sheet to open the userform or a macro to do the same.

    So I'll go help someone else.
    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.

  3. #3
    Registered User
    Join Date
    04-14-2015
    Location
    Spain
    MS-Off Ver
    office 2007
    Posts
    42

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    mehmetcik, I am sorry you did not notice, that the user only has to click in a cell in column A and the form will open. I have done this to avoid having a button on the sheet, to open the form, obscuring data on the sheet. I will also use a macro to open a different form, to edit the details, if there is a “Quote_ID” in cell A. I have made a small form simply to find out how this is done, I would not expect anyone to do everything for me, just a little assistance, please.

    I would appreciate any advice that you can offer.

    Thank you

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

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    All you need to do is specify the sheet you want the data to come from in the code you use to populate the userform.

    I'd post some code but I don't know which sheet the data is on or when you want to populate the userform.
    If posting code please use code tags, see here.

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

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    In that case I apologies. But Please give instructions in future.

    I have looked at your user form and see what you are trying to achieve.

    I would approach this differently to avoid having to rewrite this when your data base gets bigger.

    Maybe use a combo box to enter the Customer id, alternatively if you are using a text box then display the min and max values

    You could also use the name and surname text boxes to search for your entry

    I find that that is a lot more powerful and faster

    I will create something for you.

  6. #6
    Registered User
    Join Date
    04-14-2015
    Location
    Spain
    MS-Off Ver
    office 2007
    Posts
    42

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    Thank you mehmetcik, I guess that I should have made it clearer, sorry.

    Regarding the Customer ID number, I will need to see the first name - last name, to select the existing customer and then gather the details from that customer ID number. I hope this makes sense.

    So basically, the enquiry will not generate a customer record, only when the booking is confirmed, will they become a customer. But, if they are an existing customer (repeat), all of their details will populate the text boxes.

    I appreciate your help.

    Thanks

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

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    This will take a while. Check back tomorrow

  8. #8
    Registered User
    Join Date
    04-14-2015
    Location
    Spain
    MS-Off Ver
    office 2007
    Posts
    42

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    Quote Originally Posted by Norie View Post
    All you need to do is specify the sheet you want the data to come from in the code you use to populate the userform.

    I'd post some code but I don't know which sheet the data is on or when you want to populate the userform.
    Hi Norie, in the workbook attached to this post, there are 2 sheets, "Quote" and "Customers". If you click on any empty cell in colum "A" the form will open. This can be filled with details of an unknown person or it can be filled with the details of an existing customer. If you click on the "Existing Customer" (CommandButton1), a listbox will show a list of existing customers, from the "Customers" sheet.

    This is a mock up of the end result and the form will have a lot more details on it. I am only trying to learn the principle here, so that I can work on making the eventual form work right.

    Thanks for your interest.

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

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    Ok try this version.

    type a number in tb1 or names into tb2 and/or tb3
    Attached Files Attached Files
    Last edited by mehmetcik; 06-16-2015 at 03:22 PM.

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

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    I have included some error checking in this version to ensure tb2 and tb3 are text only

    I have also enabled the delete key in TB1 to TB3
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-14-2015
    Location
    Spain
    MS-Off Ver
    office 2007
    Posts
    42

    Re: Populate userform text boxes with dater from another sheet, dependant on list box sele

    Quote Originally Posted by mehmetcik View Post
    I have included some error checking in this version to ensure tb2 and tb3 are text only

    I have also enabled the delete key in TB1 to TB3
    Thank you mehmetcik, That works fine, Now I know why it says "Forum Expert" under your name.

+ 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] code populates list boxes in active sheet, but does not populate boxes in subsequent sheet
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-13-2014, 10:26 AM
  2. Replies: 0
    Last Post: 10-10-2013, 07:43 AM
  3. [SOLVED] Populate cell values into 6 named text boxes in a userform then edit if required
    By How How in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-05-2013, 05:51 AM
  4. Populate text boxes dependant on the display in 2 comboboxes
    By Tony0437 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2012, 10:53 AM
  5. Check boxes to populate list in another sheet
    By biancam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2012, 08:38 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