+ Reply to Thread
Results 1 to 8 of 8

Add new record to excel userform below the last record

  1. #1
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    457

    Add new record to excel userform below the last record

    Hi all,

    I have a userform that is really handy. The only thing that I would like to add is a button that would bring me to a new row below the last row with data and empty the form so I can add data and save it.
    I'm just not able to make this work. I think that the empty form can be omited as when the form goes to the next empty row, there should be no information anyway.

    If some one would be able to help out, would be great.

    Please find attached the excel userform that I use.

    Greetings,
    megatronixs
    Attached Files Attached Files

  2. #2
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Add new record to excel userform below the last record

    I've added a button Move Down.
    Try this:

  3. #3
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Add new record to excel userform below the last record

    Hello Stojko89,

    Thank you for your help. The button kind of works (I needed to take the End IF at the end of the code). The problem is that if I would be on a different row and I would click on the button, it will just go one row below and not to the next empty row. I guess it should check what is the last row and then one below, but my knoweldge about VBA is not enough to change this.

    Maybe you have another idea how to implement this ;-)

    Thank a lot for your help.
    megatronixs

    P.S. can you save the workbook in excel 2003 format as I don't have the newer version :-)

  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: Add new record to excel userform below the last record

    or
    Please Login or Register  to view this content.
    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-

  5. #5
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Add new record to excel userform below the last record

    Hello John,

    Thanks again for your great help. You really have a great knoweledge about VBA.
    Every time I'm working with the userform I discover new things and then I try to add new functionality to improve the user expirience ;-)

    Thanks again and have a nice day ;-)

    Greetings,
    megatronixs

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

    Re: Add new record to excel userform below the last record

    Glad it helped you! Enjoy your day!

  7. #7
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Add new record to excel userform below the last record

    Hi John,

    Is there a way that I can protect the sheet and have only the userform make the changes to the cells?
    I would like to have some columns protected that only a person can add their user name in the cell, but only via the userform with a button. This way I'm sure they will not be able to enter nothing else. If you have an idea, please let me know.

    Thanks in advance,
    megatronixs

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

    Re: Add new record to excel userform below the last record

    not sure but try this....
    Please Login or Register  to view this content.
    and in yr userform
    Please Login or Register  to view this content.

+ 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