+ Reply to Thread
Results 1 to 8 of 8

Combination of Worksheet_Change modules not working

  1. #1
    Registered User
    Join Date
    03-11-2020
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    9

    Question Combination of Worksheet_Change modules not working

    Afternoon all

    Firstly I have scoured the forum already and tried my best not to bother you all, so I apologise in advance if this question has been asked before.

    I originally had the usual 'Ambiguous name detected: worksheet_change' issue as I had two macro's in worksheet.

    I have since combined these into a single worksheet_change private sub, however now only the first of the 2 macros are working appropriately.

    The code is as follows:
    Please Login or Register  to view this content.
    I would absolutely LOVE someones guidance on what I am missing here as I have stared at this for far too long now

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Combination of Worksheet_Change modules not working

    now only the first
    Yes of course, your first statement
    Please Login or Register  to view this content.
    is leaving the sub if target is not Range("D20")

    See to use => NOT TESTED

    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    03-11-2020
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    9

    Re: Combination of Worksheet_Change modules not working

    Thanks for the response PCI

    Unfortunately still no luck - all it has acheived is switched between the 2 macros (so the 2nd now works instead of the first)

    Updated code for your perusal:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Combination of Worksheet_Change modules not working

    Remove the first
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-11-2020
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    9

    Re: Combination of Worksheet_Change modules not working

    Thanks PCI

    VERY strange, now only when I make a worksheet change to D20, will the worksheet change in D9 be recognised and macro ran

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Combination of Worksheet_Change modules not working

    A full remake
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-11-2020
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    9

    Re: Combination of Worksheet_Change modules not working

    PCI - Thank you seriously so much for helping and taking your time to assist.

    That worked perfectly.

    THANK YOU!

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Combination of Worksheet_Change modules not working

    You're welcome, pleased to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Worksheet_Change is not working
    By lexusap in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-03-2017, 03:28 AM
  2. [SOLVED] Worksheet_Change not working
    By BrotherNeptune in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-28-2015, 04:48 PM
  3. Working with several Collection class modules
    By Geetha Gupta in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-19-2013, 12:34 PM
  4. [SOLVED] Clear Contents & Worksheet_Change combination
    By Jamison in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2012, 01:47 AM
  5. Importing multiple Worksheet_Change code modules
    By mmf144 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-01-2011, 03:30 PM
  6. worksheet_change not working
    By JChandler22 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2010, 06:56 PM
  7. Combination of UDF, Worksheet_change, and copy/paste causes problem
    By embirath in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-27-2007, 06:26 PM

Tags for this Thread

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