+ Reply to Thread
Results 1 to 5 of 5

How do I stop a macros from running?

  1. #1
    Registered User
    Join Date
    02-23-2020
    Location
    Victoria, Australia
    MS-Off Ver
    MS Office Home and Student 2016
    Posts
    3

    How do I stop a macros from running?

    Hi,

    I'm new to excel. Any help will be appreciated.

    I have a worksheet with a cell (I3) that has a date in it. If that date is equal to today's current date then I want a macros called "MacrosI" to run only once. The problem is that it runs over and over again making Excel shut down and I cannot get it to stop. Below is the coding that I have come up with so far.
    Please Login or Register  to view this content.

    Thanks for any help.

    Harrison.
    Last edited by AliGW; 02-23-2020 at 04:25 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How do I stop a macros from running?

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. I have done it for you today, as you are new here.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-23-2020
    Location
    Victoria, Australia
    MS-Off Ver
    MS Office Home and Student 2016
    Posts
    3

    Re: How do I stop a macros from running?

    Thanks Ali. I didn't know how to do that before.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: How do I stop a macros from running?

    You need to test the actual cell being changed, which is the argument named Target. You are changing the Target to always be I3 whenever the worksheet changes.

    Please Login or Register  to view this content.
    Now it will run when you change the contents of I3
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    02-23-2020
    Location
    Victoria, Australia
    MS-Off Ver
    MS Office Home and Student 2016
    Posts
    3

    Re: How do I stop a macros from running?

    Thank you Andy!! That makes sense.

+ 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] Have Autorun Macros but can we stop them running at one particular interval
    By NametobeRenamed in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-02-2019, 07:29 PM
  2. [SOLVED] Two macros are running separately but they are not running at once
    By RavindraK in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-18-2018, 11:51 PM
  3. [SOLVED] Event Driven Macros stop running after running a routine macro
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2017, 12:34 PM
  4. [SOLVED] Hiding the file when running macros and after running macros
    By thilag in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2016, 07:15 AM
  5. Replies: 19
    Last Post: 05-31-2011, 09:00 AM
  6. Web queries, Macros, Stop auto-running, Userforms
    By Flashart in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2008, 03:51 PM
  7. Stop Macros from Running When Workbook Opened via Automation
    By Google Boy of Company C in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-15-2005, 12:05 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