Code:
Option Explicit
Dim TimeToRun
'Sub auto_open()
' Call ScheduleclrCol 'uncomment this for code to auto run when sheet is opened
'End Sub
Sub ScheduleclrCol()
TimeToRun = Now + TimeValue("00:01:00") '<----- adjust time to fire here HH:MM:SS
Application.OnTime TimeToRun, "runmycode"
End Sub
Sub runmycode()
'Your code here <--- place your code here to be run once per minute
Call ScheduleclrCol
End Sub
'Sub auto_close() 'uncomment this for code to auto stop when sheet is closed
' On Error Resume Next
' Application.OnTime TimeToRun, "clrCol, , False"
'End Sub
Sub manual_stop() 'button click for stop (Manual Stop)
On Error Resume Next
Application.OnTime TimeToRun, "clrCol", , False
End Sub