+ Reply to Thread
Results 1 to 9 of 9

Populate user form based on combobox choices

  1. #1
    Registered User
    Join Date
    07-19-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    40

    Populate user form based on combobox choices

    I am trying to populate the edit record form. based on the selection from the Surname and first name comboboxes. once the data is edited the click the edit button to Save the changes. i have tried amending sample codes to acheve this but end up completely lost. can anyone help please.
    Attached Files Attached Files
    Last edited by zardof; 09-18-2012 at 11:34 AM.

  2. #2
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Populate user form based on combobox choices

    I'm editing your userform now. And should be done in 10min
    I'll upload the file back to you.
    But I'm putting in a sample. You'll have to edit the code for the userform to work all the way.

  3. #3
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Populate user form based on combobox choices

    Here is the workbook back
    I've made it so when you pick a surname and name you want to edit it inserts the phone number in the userform so you can view it.
    You have to edit the code so other listboxes will be populated with the right info <<---check code.

    After you have done editing you hit the edit button and it will edit the values on the sheet of the surname and name you click.
    In case you're trying to edit a name or surname that doesn't exist on the sheet it will pup up a msg box that says the names were not found.

    Try it out and let me know how it goes
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-19-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Populate user form based on combobox choices

    This is working almost perfectly. i am having trouble getting The AGB Text box to show the formula results for its offset.
    Attached Files Attached Files

  5. #5
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Populate user form based on combobox choices

    It shows the result.
    Do you want it to write $38,00 instead of only 38?

  6. #6
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Populate user form based on combobox choices

    So for populating agb1 use this:
    Please Login or Register  to view this content.
    Just change the € to the Pound sign

  7. #7
    Registered User
    Join Date
    07-19-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Populate user form based on combobox choices

    Thats what i was trying to show. but when you edit the record it over writes the formula in the cell. is there a way of just showing the result of the formula. i have tried locking the textbox but no joy there.

  8. #8
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Populate user form based on combobox choices

    Maby when you hit Edit - The code should leave the agb1 out and not copy the value from the form to the sheet, because the formula in the sheet will give you the new value in on sheet anyway.
    So don't do the
    Please Login or Register  to view this content.
    <<<----leave this part out of the code.
    Last edited by stojko89; 09-20-2012 at 04:21 AM. Reason: Code change

  9. #9
    Registered User
    Join Date
    07-19-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Populate user form based on combobox choices

    That did it thanks very much

+ 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