+ Reply to Thread
Results 1 to 9 of 9

How to launch a macro when cell = TRUE

  1. #1
    Forum Contributor
    Join Date
    05-24-2006
    Location
    Los Angeles
    MS-Off Ver
    2019
    Posts
    328

    How to launch a macro when cell = TRUE

    Hi,

    How can I get macro1 to launch when a cell named "ChangePercent" changes to TRUE and that cell is not located on the active worksheet?

    Thanks!

    Lawrence
    Last edited by skysurfer; 03-25-2010 at 12:30 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to launch a macro when cell = TRUE

    What will trigger the change?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    05-24-2006
    Location
    Los Angeles
    MS-Off Ver
    2019
    Posts
    328

    Re: How to launch a macro when cell = TRUE

    Thanks for the quick reply! It will most likely be the result of a formula. That is, if the cell in named range "ChangePercent" calculates to = TRUE, then macro1 is triggered.

    Lawrence

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to launch a macro when cell = TRUE

    But where will the formula be?

  5. #5
    Forum Contributor
    Join Date
    05-24-2006
    Location
    Los Angeles
    MS-Off Ver
    2019
    Posts
    328

    Re: How to launch a macro when cell = TRUE

    The formula will be in "ChangePercent" located on the Excel-named worksheet Sheet8.

    Lawrence

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to launch a macro when cell = TRUE

    Then use the Change or Calculate event of that sheet to run the macro. Attach a workbook for further help

  7. #7
    Forum Contributor
    Join Date
    05-24-2006
    Location
    Los Angeles
    MS-Off Ver
    2019
    Posts
    328

    Re: How to launch a macro when cell = TRUE

    Okay, I've come across some code that got me there. Made a few mods and here it is!

    The code monitors a specific cell and if that cell changes, it triggers a macro (in this case, cell formatting). The benefit of this code is that you can trigger the macro when only ONE cell changes and not when there is any change to an entire spreadsheet of cells (which could slow things down significantly if there are a lot of calcs on that spreadsheet).

    As you can see, this code works for ANY change in the cell. A number value change or a change from TRUE to FALSE.
    Thanks for your feedback! It lead be down the right path.

    Lawrence
    Attached Files Attached Files
    Last edited by skysurfer; 03-25-2010 at 12:32 PM.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to launch a macro when cell = TRUE

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  9. #9
    Forum Contributor
    Join Date
    05-24-2006
    Location
    Los Angeles
    MS-Off Ver
    2019
    Posts
    328

    Re: How to launch a macro when cell = TRUE

    I did that. Is not registering???

    I'll try it again...

    Lawrence

+ 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