Results 1 to 7 of 7

How to copy/insert new row into worksheet?

Threaded View

  1. #1
    Registered User
    Join Date
    08-05-2011
    Location
    Kaavi
    MS-Off Ver
    Excel 2007
    Posts
    45

    How to copy/insert new row into worksheet?

    Hello,

    I'm using this macro-code to insert new rows into worksheet

    Sub insertrow()
    ActiveSheet.Unprotect
    With Rows(6)
        .Copy
        .Insert 'the copy will be put in the newl;y created row
        Range("D6").ClearContents
    End With
    Application.CutCopyMode = False
    ActiveSheet.Protect
    End Sub

    It copies row 6 and inserts it down to row 7.

    I need to modify this code so that it copies both row 6 and row 7 and then inserts copies down to rows 8 and 9, or something like that. Rows 6 and 7 needs to be copied and new copies needs to be inserted below. is this possible??

    Thanks in advance!
    Last edited by Crüe; 09-14-2011 at 03:06 AM.

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