+ Reply to Thread
Results 1 to 2 of 2

Excel Shift Entire Row Down VBA

  1. #1
    Registered User
    Join Date
    11-24-2008
    Location
    York
    Posts
    26

    Excel Shift Entire Row Down VBA

    That slice of heaven below works almost where I want it to however the ActiveCell.Insert Shift:= xlDown part it can literally infinitly loop till it gets tothe bottom of the page. What I want to do overall is when it gets to the ActiveCell or empty row it will shift the row down before adding the new name to the list to be sorted alphabetically. I have San Juan part becuase There is a space between "Sections" one Philadelphia/San juan/ locations so at the end of one section I want someone to enter a name that will get added to an employee list "above the space" so thus making sure that space always exists so nothing is ever written over.

    That is where the problem occurs Shift :=xlDown sucks. Everything else I want it to do works. I just need it to shift the row down where the active cell is.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    It might be that the shift is itself firing another run of the worksheet_change macro.

    You could try putting

    Please Login or Register  to view this content.
    at the start of the proceedure

    and

    Please Login or Register  to view this content.
    at the end to make the code behave more cleanly.
    Martin

+ 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