+ Reply to Thread
Results 1 to 3 of 3

adding rows with macros without ruining other macro references

  1. #1
    Registered User
    Join Date
    05-29-2012
    Location
    San Diego, CA USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    adding rows with macros without ruining other macro references

    Wondering if someone can help me. I've scoured message boards and excel/vba sites but I'm not getting anywhere fast. I would like to add code to the 'Add Row' buttons so that, if pressed, a blank row will be added to the section below it corresponds with. The buttons are placed alongside the titles of the section they should add the row to. Problem I am having is that once I add a row to one section, something off sets that functionality when the button is pressed for one of the sections below it. The code should unprotect and reprotect the worksheet at the start and finish and there is text hidden in the protected columns to the right of it that I'm using to adjust the row height of merged cells. So those formulas would have to be carried down as well. Can anyone help with this? (password is blank)

    thanks in advance


    oh yeah, and the macro that fits text for the rows in those sections is also not aligning when rows are added so if that can be fixed as well that would be great.help adding rows.xlshelp adding rows.xls

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: adding rows with macros without ruining other macro references

    Hi,

    See attached.

    I've simplified your macros and put the 'add row' macros in a new module called 'AddRow'


    Regards
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-29-2012
    Location
    San Diego, CA USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: adding rows with macros without ruining other macro references

    oh my lord I think I love you Richard. I honestly can't thank you enough. I really appreciate you taking the time to reply and work on that for me. It makes such a huge difference. It works perfectly. Seriously thank you so much.

+ 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