+ Reply to Thread
Results 1 to 2 of 2

Running a Macro Based on a Condition

  1. #1
    Registered User
    Join Date
    10-07-2020
    Location
    Ontario
    MS-Off Ver
    2010
    Posts
    5

    Running a Macro Based on a Condition

    Hi there,

    I have created 'Cancel_Macro' in the attached worksheet to strikethrough and delete the applicable Color cell if 'Cancel' is chosen for status (Data Validation).

    I have used the following VBA to set up this condition for the worksheet:

    Please Login or Register  to view this content.
    Please let me know where I am going wrong.

    Any help is greatly appreciated.

    Thank you
    Attached Files Attached Files
    Last edited by 6StringJazzer; 04-16-2021 at 11:27 AM. Reason: PLEASE USE CODE TAGS

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Running a Macro Based on a Condition

    Never Set Target in Worksheet_Change. Target tells you what cell changed. You wiped it out.

    I am guessing you want this:
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Running Macro Based on Cell
    By box-o-rocks in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-06-2021, 07:58 AM
  2. [SOLVED] Running condition based Macros when working with a live data feed
    By Ourkid123uk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2018, 01:30 PM
  3. [SOLVED] Stop macro from running when condition not met
    By Jamesera27 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-09-2014, 07:51 PM
  4. Running an if condition looped with another if condition in VBA
    By anuj.agarwal in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-04-2010, 08:12 PM
  5. Running or bypassing code in a macro based on a certain condition...
    By kenab1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-17-2010, 04:03 PM
  6. Running Macro based on Cell value
    By titovalle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2007, 02:53 PM
  7. Running a macro based on a value
    By Jeanne Conroy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2006, 06:25 PM

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