+ Reply to Thread
Results 1 to 3 of 3

VBA code continues to return to specific cell after data is entered

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    Birmingham, Alabama
    MS-Off Ver
    Excel 2010
    Posts
    11

    VBA code continues to return to specific cell after data is entered

    Any suggestions would be greatly appreciated. I am using the Application.Goto reference:=ActiveCell, Scroll:=True and every time data is entered into another cell it returns to the previous referenced cell. I'm not sure how to stop it. Here is an example of my code:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA code continues to return to specific cell after data is entered

    Have you tried getting rid of the GoTo?????
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA code continues to return to specific cell after data is entered

    Each If statement is evaluated. That means the last If statement that has a Blank cell will determine what cell is selected.

    So if range J264 is blank, then A273 will be selected regardless of what cell was just change. As long as J264 is blank, A273 will be selected. And if J264 is not blank, the last previous If-Blank statement that is true will select the cell.

    Try something like this. Only the cell that was Changed will evaluate its IF code block.

    Please Login or Register  to view this content.
    Double check that I got all the range references correct.

+ 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