+ 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
    365
    Posts
    52

    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, UK
    MS-Off Ver
    365
    Posts
    7,468

    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

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    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
    365
    Posts
    52

    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, UK
    MS-Off Ver
    365
    Posts
    7,468

    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
    365
    Posts
    52

    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, UK
    MS-Off Ver
    365
    Posts
    7,468

    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
    365
    Posts
    52

    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, UK
    MS-Off Ver
    365
    Posts
    7,468

    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
    365
    Posts
    52

    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, UK
    MS-Off Ver
    365
    Posts
    7,468

    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
    365
    Posts
    52

    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)

Similar Threads

  1. [SOLVED] VBA to see if TextBox.Value exists in sheet, If not to insert and populate
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-27-2016, 12:26 PM
  2. [SOLVED] If Statements in Userform TextBox to populate other textbox
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2016, 06:57 AM
  3. [SOLVED] Populate count & sum based on equal to & not equal to factors
    By jscalem in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-20-2015, 01:20 PM
  4. trying to populate a listbox with rows from sheet then when selected split into textbox
    By justlearning123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2015, 06:45 AM
  5. VBA textbox equal time of first change
    By Lalie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-28-2014, 07:26 AM
  6. Populate TextBox from Module prior to opening TextBox
    By Dabbler39 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2013, 05:50 PM
  7. Replies: 3
    Last Post: 03-09-2013, 12:55 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