VBA code to stop watch based on cell value

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • 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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!