+ Reply to Thread
Results 1 to 2 of 2

The second time around, the macro does not accomplish the same task.

  1. #1
    Registered User
    Join Date
    12-29-2009
    Location
    San Francisco
    MS-Off Ver
    Excel 2003
    Posts
    1

    The second time around, the macro does not accomplish the same task.

    Well it does in one sense, it does what I told it to, but that isn't what I mean.

    Macro: It copies 3 rows of cells from a reference (R) worksheet. It inserts them into the input page (I) at a specific point. The macro goes back to R and copies a different single row. The macro then goes to the cover page (C) and inserts this single row into a specific row. Next, the Macro connects the cells on C with the cells on I.

    This works the first time. BUT... the second time, everything works up until it connects the cells on C & I. This time, the cells on C reference one row down from the original reference but I added three rows and I need the linking to be in relation to the 1st line of the inserted cells and specific cells after that.

    I attached the file so if you give this a whirl, run the Module4AddCC macro twice. The second time, notice that on the cash flows page, the 2nd macro's name bar has the contents of the cell directly under the reference above.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: The second time around, the macro does not accomplish the same task.

    Hello Elliot,

    Welcome to the Forum!

    As with accounting, organization, consistency and attention to detail are key. The same is true for programming. Please refer to worksheet names you use in the workbook. Stay away from hypothetical examples and use real examples. There are so many "#REF" errors in the formulae it is impossible to know what you are doing. If this workbook is linked to another workbook, that workbook needs to accompany this one. Once you have everything organized, someone will be able to help you.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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