Results 1 to 2 of 2

Code to insert row at top left cell

Threaded View

  1. #1
    Registered User
    Join Date
    04-14-2012
    Location
    saudi arabia
    MS-Off Ver
    Excel 2007
    Posts
    16

    Code to insert row at top left cell

    Hi,

    I am trying to insert a blank row at first row but it keeps inserting the row at wrong place although I am selecting row number 1 in the code.

    Sub testtest()
    
        ActiveCell.EntireRow(1).Select
        Selection.Insert Shift:=xlUp
    
    End Sub
    Thank you.
    Last edited by JBeaucaire; 07-14-2012 at 03:14 AM. Reason: added code tags, you may receive infractions if you keep forgetting. Take care...

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