+ Reply to Thread
Results 1 to 11 of 11

Retrieving data from sheet into userform and being able to update(replace) that data

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    Costa Rica
    MS-Off Ver
    Excel 2003
    Posts
    10

    Retrieving data from sheet into userform and being able to update(replace) that data

    Hello all,

    I'm new here and would like to know if you can help me with this.

    I"ve created an excel form which feeds an excel sheet with data. This userform has several textboxes.

    Every time I create a new entry the userform will populate a new row with the values specified.

    I want to create a command button (RETRIEVE) to find a value that has been previously entered in a textbox in the sheet and then auto populate the rest of textboxes with the values of that row.

    Once that's been done I want to be able to update (replace) that information with another command button (UPDATE).

    Any help would be very appreciated.

  2. #2
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    Hi crobando

    Please attach a file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.

    Include in the attachment any code you're currently using (whether it works or not).
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    10-24-2012
    Location
    Costa Rica
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    Requests.xls

    Here is the file.

    Thanks in advance.

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

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    Is it the DERS Request column that will have the value you want to find?

    If it is you could use a combobox instead of a textbox for DERS Request.

    The combobox would be populated from the DERS Request column.

    When the user selects from the combobox it's ListIndex property can be used to get the row.

    If there was some sample data I could demonstrate what I mean.

  5. #5
    Registered User
    Join Date
    10-24-2012
    Location
    Costa Rica
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    Well... So far I have no data in this document but if you could just enter dummy info in there that's would be fine. I just need to know how to be able populate all text boxes from the ders request number and then update that information.

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

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    I've no idea what sort of data to enter in the worksheet, could you not add some?

  7. #7
    Registered User
    Join Date
    10-24-2012
    Location
    Costa Rica
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    Requests2.xls

    Here is the file with some data in it. Thanks!

  8. #8
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    Hi crobando

    When you click the RETRIEVE button, what would you like to search on...ONLY DERS Request or would you like to be able to search on other fields?

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

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    Have a look at the atttached.

    By the way, why was the font of all the textboxes set so you couldn't see what was in the textbox?

    Took me a while to realise that.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-24-2012
    Location
    Costa Rica
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    THANK YOU NORIE!!! It worked perfectly! You changed most of my code but I understood yours so it's ok I really thank you for this. Now the next step is generating an initial email and a completion email but I will try to do it myself. Thank you again!

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

    Re: Retrieving data from sheet into userform and being able to update(replace) that data

    Glad it worked.

    I didn't really change your code, I just tidied it up and got rid of a few redundant bits.

+ 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