+ Reply to Thread
Results 1 to 4 of 4

Userform - always add data to next available empty row

  1. #1
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Userform - always add data to next available empty row

    Hi all,

    I have attached an example of my Userform and how I would like my data to be inputted onto the next available empty row on sheet 'DB' for the range A3-L3 (excluding D3 though).

    So the first user's data will be inputted: A3-L3 (excluding D3), 2nd user A4-L4 (excluding D4), 3rd user A5-L5 (excluding D5)and so on... (see example worksheet)

    After the Command Button is pressed the form should reset itself ready for the next user (but stay open).

    I have set up the form and the Row Source for each combo-box (using named ranges).

    Basically I'm looking for some code which I can attach to the Command Button which will execute the above.

    Can anyone help?

    (also i would like the form to open on Sheet1 whenever the workbook is opened if thats easy to do...?)
    Attached Files Attached Files
    Last edited by D_N_L; 02-17-2012 at 03:43 AM.

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Userform - always add data to next available empty row

    hi
    add a commandbutton to yr UserForm and then add this piece of code. see if it helps you!
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Userform - always add data to next available empty row

    Hi John,

    Thank you - this works perfectly!!

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Userform - always add data to next available empty row

    hi Plumby
    glad it helped you!
    Regards, John55
    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.

    ...enjoy -funny parrots-

+ 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