+ Reply to Thread
Results 1 to 12 of 12

Populate row on sheet with textbox value in columnumber equal to textboxnumber

  1. #1
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    2016
    Posts
    25

    Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Hello,

    I could really really do with some help with a Userform.

    The UF consist of over 90 textboxes divided over a number of frames, but not sequential (unfortunately)

    So
    - Frame1 might have textbox1, textbox2 and textbox7
    - Frame2 might have textbox3, textbox9 and textbox5 ... and so on.

    Each frame has a submit button.

    Upon clicking the submit button I would like to have the values of the textboxes from that particular frame to be placed:
    - on sheetx
    - in row2
    - in the columnumber that is equal to the textboxnumber.

    Example
    the value of textbox11 shoud be placed in sheetx, row 2, column K

    Can anyone help me out with the proper code?

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    2010 & 2016
    Posts
    3,976

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Any chance you could attach the workbook?
    Easier to help with a tailor made solution if we can see that.

    Click on GO ADVANCED, below your reply, and then scroll down to Manage Attachments to open the upload window.

    BSB
    Please show appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    2010 & 2016
    Posts
    3,976

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Not tested as I don't have a sample file but something like this could work:
    Please Login or Register  to view this content.
    BSB

  4. #4
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    2016
    Posts
    25

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Hi BSB,
    Wow, that's fast.
    I was working on a example file, but will try your suggestion first and revert.
    Thanks!

    * Edit:

    IT WORKS GREAT!

    Feeling utterly stupid, but very very happy. Have been struggling with this for hours!

    Thanks a zillion and have a wonderfull ending of 2017!

    Warm regards,

    MamaExcel
    Attached Files Attached Files
    Last edited by mamaexcel; 12-30-2017 at 07:01 PM.

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    2010 & 2016
    Posts
    3,976

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    As I said, it's not tested, so let us know if you have issues with it.

    You'll need to change CommandButton, Frame and Sheet names in the code to suit.

    BSB

  6. #6
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    2016
    Posts
    25

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Done! Works like a charm, very grateful for your quick response.

    Gr,
    MamaExel

  7. #7
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    2010 & 2016
    Posts
    3,976

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Glad I could help

    No need to feel stupid. Sometimes it just needs a fresh pair of eyes.

    BSB

  8. #8
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    2016
    Posts
    25

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Back again...

    Can I adjust my request a little?

    How should I ammend the code to have the values set on the first empty row on sheetx?

    I've tried to get this done with "ThisWorkbook.Sheets("Sheetx").Cells(Rows.Count,1).End(xlup) +1" but cannot get it right.

    Any help is appreciated.

  9. #9
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    2010 & 2016
    Posts
    3,976

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Add this to the start of the sub:
    Please Login or Register  to view this content.
    Then change this line:
    Please Login or Register  to view this content.
    To this:
    Please Login or Register  to view this content.
    Does that work for you?

    BSB

  10. #10
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    2016
    Posts
    25

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Hi BSB,

    Actually I did exactly as you suggest but still get an error 13 / type mismatch on this line.

    Please Login or Register  to view this content.
    I've attached the wb, can you have a look and tell me what i'm missing?
    Attached Files Attached Files

  11. #11
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    2010 & 2016
    Posts
    3,976

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Apologies mamaexcel! I was in a rush to get to a meeting when I was replying and missed a bit from the code line.
    Try this:
    Please Login or Register  to view this content.
    BSB

  12. #12
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    2016
    Posts
    25

    Re: Populate row on sheet with textbox value in columnumber equal to textboxnumber

    Of course, that's it! Too bad I missed that.

    Thanks again BSB, it works as I needed it to work.

+ 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