+ Reply to Thread
Results 1 to 3 of 3

Worksheet_Change event doesn't get fired

  1. #1
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    Worksheet_Change event doesn't get fired

    Hi there

    The Worksheet_Change event doesn;t get fired again to capture the exact row infomation.

    The following is the macro i have

    Please Login or Register  to view this content.
    This works the first time when i change a cell value from No(which is default) to Yes on a certain cell in the current row. But when i change the same Yes to No and then Yes again and step through the code in debug mode, after previousTargetAddress = Target.Address line it justs straight to Else statement and then end if

    Please advice

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Worksheet_Change event doesn't get fired

    Where are all the variables declared?

    Variables whose values are intended to persist must be declared as static.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Worksheet_Change event doesn't get fired

    You have created this code specifically to test if Target.Address = PreviousTargetAddress.

    Based on your code:

    1) if the address is NOT the same as the last cell that was triggered, do the code
    2) if the address IS THE SAME, do nothing, go straight to END IF.

    As I mentioned in your prior post, if you no longer wish to do this current/previous address test and ALWAYS trigger the activity shown in your code, take out the test at the top of the IF/THEN.

    Do you see what I'm talking about?

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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