+ Reply to Thread
Results 1 to 5 of 5

Modifying an Existing Macro to Add a New Row to The Top of The Table

  1. #1
    Registered User
    Join Date
    08-30-2018
    Location
    Hastings, NE
    MS-Off Ver
    MS 365
    Posts
    74

    Modifying an Existing Macro to Add a New Row to The Top of The Table

    Is it possible to modify a macro to add a new row to the top of a protected table instead of the bottom? I ask because after numerous entries into the table, the user would have to scroll to the very bottom of the worksheet to enter data into the table. Here is the current code I'm working

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

    Re: Modifying an Existing Macro to Add a New Row to The Top of The Table

    Try:
    Please Login or Register  to view this content.
    Last edited by Mumps1; 02-08-2019 at 04:17 PM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Modifying an Existing Macro to Add a New Row to The Top of The Table

    Change
    Please Login or Register  to view this content.
    into
    Please Login or Register  to view this content.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  4. #4
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,495

    Re: Modifying an Existing Macro to Add a New Row to The Top of The Table

    Adding cells at the first row increases the risk of overwriting the rows below with new data unintentionally, (from my experience that is.)

    just as easy you can add a line of code to scrolldown to the new row and show it right
    I highlited the added code

    see this code that does that
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-30-2018
    Location
    Hastings, NE
    MS-Off Ver
    MS 365
    Posts
    74

    Re: Modifying an Existing Macro to Add a New Row to The Top of The Table

    Thank you everyone for your assistance. After reading Roel Jongman's warning about the possibility of loosing data, I chose to use his code addition and it works great. Thank you Roel!

+ 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. Need help modifying an existing formula please
    By pigment01 in forum Excel General
    Replies: 1
    Last Post: 09-13-2017, 05:30 PM
  2. Modifying an Existing Macro linking data from multiple worksheets
    By mike01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2016, 12:04 AM
  3. NEEDED: help modifying existing VBA macro to input data automatically in different rows
    By Pimp_mentality in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-05-2015, 10:28 AM
  4. Modifying existing code
    By rhouston08 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2015, 06:03 PM
  5. Copying one sheet into another workbook (modifying existing macro)
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2014, 04:50 AM
  6. Help modifying macro to wrap iferror formulas around existing formulas
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2012, 02:04 PM
  7. Help modifying existing VBA code
    By camcafe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2008, 11:02 AM

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