+ Reply to Thread
Results 1 to 3 of 3

Stop macro based on cell value

  1. #1
    Registered User
    Join Date
    12-04-2017
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    5

    Lightbulb Stop macro based on cell value

    Command button linked to Recalc macro. I am looking to add code to the below to stop watch based on text in a certain sheet

    Dim SchedRecalc As Date
    Sub Recalc()
    Range("A1").Value = Format(Now, "dd-mmm-yy")
    Range("A2").Value = Format(Time, "hh:mm:ss AM/PM")
    Call SetTime

    End Sub

    Sub SetTime()
    SchedRecalc = Now + TimeValue("00:00:06")
    Application.OnTime SchedRecalc, "Recalc"

    End Sub

    Sub Disable()
    On Error Resume Next
    Application.OnTime EarliestTime:=SchedRecalc, Procedure:="Recalc", Schedule:=False
    End Sub

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,943

    Re: Stop macro based on cell value

    Change

    Please Login or Register  to view this content.
    to something like

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    12-04-2017
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    5

    Re: Stop macro based on cell value

    Thanks Bernie, I'll give it a try

+ 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] Macro to stop userform from unloading based on argument
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-19-2014, 08:15 PM
  2. If cell contains text string then run macro, otherwise stop macro and popup message
    By justindk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2014, 08:20 AM
  3. [SOLVED] Blank cell must not stop the macro
    By madmot in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-24-2013, 09:17 AM
  4. [SOLVED] VBA to stop macro if certain cell is a certain value
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2012, 04:32 PM
  5. Replies: 0
    Last Post: 07-25-2012, 05:40 PM
  6. [SOLVED] Call another Macro or Stop Macro Based on MsgBox Yes or No
    By GStone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2012, 05:59 PM
  7. Stop Macro, Select Cell, Restart Macro
    By tenk283 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-26-2010, 12:48 AM

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