+ Reply to Thread
Results 1 to 6 of 6

Change Event doesn't change until I return to the Target Cell

  1. #1
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686

    Change Event doesn't change until I return to the Target Cell

    More often than not when I create a Change Event,
    where entering data into one cell automatically changes a second cell
    the second cell doesn't change

    After I hit enter to enter the data into the Target Cell then I have to reactivate the Target Cell inorder to make the second cell change.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Can you post the code?

  3. #3
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814
    I'm not entirely certain what your overall routine is supposed to do, but I'm guessing you really want something other than the selectionchange event. From VBA help, the selectionchange event, "Occurs when the selection changes on a worksheet." and "Target [is] The new selected range." Note that this event isn't necessarily triggered when data is entered into a cell. So what happens is you select a cell away from the cell where the data were entered and the selectionchange event is triggered, but target no longer refers to the changed cell. Then when you go back to select the changed cell, the selectionchange event is triggered again, but now target does refer to the desired cell.

    I expect what you really want is the Change event, which does occur when the user enters data into a cell.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Why not use the actual Change event?

    You might also want to try and incorporate the AddInfo code into the event code.

    I don't see any reason why it needs to be seperate.

  6. #6
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686
    Yes, Change Event is really what I want
    which explains why SelectionChange often doesn't work right for me!
    .....that's what happens when you only know enough to be dangerous!

    and the reason I call the AdInfo procedure is my Worksheet Code is so long that I keep it shorter and more readable by calling other procedures.

    THANKS AGAIN

+ 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