+ Reply to Thread
Results 1 to 5 of 5

How to execute a macro when a cell value changes?

  1. #1
    Registered User
    Join Date
    04-07-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    35

    How to execute a macro when a cell value changes?

    Hi everyone,

    I got some help coming up with the following code.

    The code works, only when I get into VBA window and I Run it (Tools/Macro/RUN)

    How can I force it to automatically run when the content of cell B6 changes?

    Maybe I didn't input the macro as it should be, I went in VBA, right click on the sheet that I want, insert, Module.

    I really need help on this one

    Here is the code

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to execute a macro when a cell value changes?

    right click on the sheet name at the bottom of excel and select view code.

    Paste this code into the window that opens

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    04-07-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    35

    Re: How to execute a macro when a cell value changes?

    Thanks for this one,

    When I follow the instruction, I get the place to input the code, but there are already something in the Private Sub Worksheet_Change(ByVal Target As Range)

    Please advise as how I can get around this one.

    Thanks

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to execute a macro when a cell value changes?

    Try something like:-


    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-07-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    35

    Re: How to execute a macro when a cell value changes?

    Thank you very much for the help on this one, it just not automatically run when I change the value in B6.

    I think I will have to attach the code to a button to make it run manually.

    Any suggestions will still be welcome

+ 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. [SOLVED] Execute macro on cell value change
    By tom.mat.walker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2015, 05:14 AM
  2. Execute a macro in a closed workbook, or open and execute without the user noticing
    By cearaujo123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2015, 06:44 PM
  3. [SOLVED] VBA to execute macro on A column cell selection
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2014, 06:06 AM
  4. Execute Cell with a Macro (timer)
    By flds in forum Excel General
    Replies: 6
    Last Post: 05-13-2010, 07:26 AM
  5. macro to execute code from cell.value?
    By wamp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-19-2010, 04:29 AM
  6. On Cell change, execute macro
    By des_wes in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-19-2007, 07:01 PM
  7. [SOLVED] How do I execute a macro based on the value of a cell in Excel?
    By brettopp in forum Excel General
    Replies: 12
    Last Post: 06-16-2006, 08:30 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