+ Reply to Thread
Results 1 to 7 of 7

Take values from user form to cells in a certain row

  1. #1
    Registered User
    Join Date
    07-26-2017
    Location
    The Netherlands
    MS-Off Ver
    2010
    Posts
    20

    Take values from user form to cells in a certain row

    Hi,

    I have a problem with looking up a certain value through a user form and then change the data in the row that value is in.

    To find the right row I came to this code:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    To change the cells I had something like this in mind:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    What I want to achieve in text: There is product data in rows and columns. Through a user form I select the right product. In text boxes the data of this product appears. In a 2nd set of text boxes this data also appears. In this 2nd set of text boxes I change the data and leave the data in the 1st set of boxes untouched. By a command button the data from the 2nd set of boxes should be put in the right row, by looking up the original product from the 1st set of boxes.

    Thanks for the help in advance!

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Take values from user form to cells in a certain row

    Hallo Victor,

    If I understand correctly eRow should be the row for "Found"? I might suggest something like this:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    07-26-2017
    Location
    The Netherlands
    MS-Off Ver
    2010
    Posts
    20

    Re: Take values from user form to cells in a certain row

    Hmm, that was my thought as well, but does not work. Let's forget what I've set up so far, because I feel it is a bit of a mashup of different solutions. How would you tackle the problem I described without looking at the code?

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Take values from user form to cells in a certain row

    Are there duplicates in your product column or are they all unique values ?

    Best to provide an example file file with some data and your userform so we have something to work with.

    To start this will populate your userform controls with searched data.

    Please Login or Register  to view this content.
    And this will write changes back to worksheet.

    Please Login or Register  to view this content.
    Last edited by bakerman2; 07-31-2017 at 08:32 AM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Take values from user form to cells in a certain row

    Victor.. what do yo mean by doesn't work? I see there is a period in front of Cells (.Cells).... is this within a With ... block?

  6. #6
    Registered User
    Join Date
    07-26-2017
    Location
    The Netherlands
    MS-Off Ver
    2010
    Posts
    20

    Re: Take values from user form to cells in a certain row

    I am not really sure, but the option of Bakerman2 actually solved it. And nope, there are no duplicates in this column. I can see why my try was way harder then the solution. By using the frow and application.match I got both problems tackled in one line. Thanks for the support!

    I'm quite new to Macro's and VBA coding, so sometimes I struggle to find the right 'language'. This forum has been very helpful so far, so thanks again!

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Take values from user form to cells in a certain row

    Glad to help.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Copy Values in User Form to Specific Cells
    By FallingDown in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-15-2016, 06:04 AM
  2. User form text box generating values in specific cells
    By jeck876 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2016, 05:49 PM
  3. Getting the values in Database form from user form
    By HB07 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-05-2015, 06:45 AM
  4. Issue populating values in User Form to proper cells on Sheet1
    By Grilleman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2015, 12:40 PM
  5. [SOLVED] User Form to execute search and return all values to the user form for editing
    By allwrighty in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2013, 10:40 PM
  6. How to create user form that displays values from cells
    By TomT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2008, 02:57 AM
  7. Cell values on a User Form
    By samtwilliams in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2007, 12:28 PM

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