Selected Answer
Sunil
In the revised file attached, I've rationalised your various modules, timers and subs into a single, consistent approach in Module 1.
When the workbook opens, a single Interval is set in sub SetStartTime, currently 1 minute via TimeValue("00:01:00") but you could reduce it to 10 seconds at your risk. Then the sub TimerLogic is launched.
That determines the NextTime that macros will be run (dependent on the current time c.f. the Start and stop times set in SetStartTime) and gives a MsgBox if the start is in the future (i.e. the file opened before 9:00am currently)..
TimerLogic uses Application.OnTime to launch the new macro "TimerActions" below (at NextTime)which calls the other macros in this sequence (currently):
Sub TimerActions()
'run macros after another (arrange sequence to suit)
Myclearmacro
MyMacro
MyATR
' check and set timer if needed
TimerLogic
End Sub
(each of which reports its completion in the
Immediate pane of VB Explorer via a
Debug.Print line, which you can comment out after testing). That macro runs the other macros and so gives Intermediate output like this:
TimerActions due (with interval and rounding)= 22/09/2021 14:43:00
Actioned myClearMacro: 22/09/2021 14:43:00
Actioned myMacro: 22/09/2021 14:43:00
Actioned myATR: 22/09/2021 14:43:00
TimerActions due (with interval and rounding)= 22/09/2021 14:44:00
Actioned myClearMacro: 22/09/2021 14:44:00
Actioned myMacro: 22/09/2021 14:44:00
Actioned myATR: 22/09/2021 14:44:00
TimerActions due (with interval and rounding)= 22/09/2021 14:45:00
Actioned myClearMacro: 22/09/2021 14:45:00
Actioned myMacro: 22/09/2021 14:45:00
Actioned myATR: 22/09/2021 14:45:00
TimerActions due (with interval and rounding)= 22/09/2021 14:46:00
TimerActions cancelled at 22/09/2021 14:46:17
where the last line follows a manual run of the single
StopTimer sub.
Please do NOT add additional modules/ code until you've checked that this does what you need. You should only need to modify two macros i.e.the intervals and thresholds in StartTime and the sequence of macros under TimerActions. (I didn't know what to do with sub RecordMinMax but left it in Module1).
I hope this finally fixes your problems since I've spent far too long oniterations of this workbook.