Results 1 to 3 of 3

Add row at specific location using vba

Threaded View

  1. #3
    Registered User
    Join Date
    02-05-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Add row at specific location using vba

    Thanks for your reply. I have written some vba which does the trick. I hope it helps someone else:
    Application.EnableEvents = False
    
    Application.ScreenUpdating = False
    With ActiveSheet
    .Protect Password:="PASSWORD", _
    UserInterFaceOnly:=True
    Application.GoTo reference:="OBJ"
    ActiveCell.Offset(-1, 0).Range("A1:AM1").Select
        Selection.Copy
    Application.GoTo reference:="OBJ"
        Selection.Insert Shift:=xlDown
    
        Application.GoTo reference:="OBJ"
        ActiveCell.Offset(-1, 0).Range("A1:AM1").Select
            Selection.ClearContents
     End With
    Last edited by Leith Ross; 02-06-2011 at 03:16 PM. Reason: Added Code Tags

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