JumboCactuar
Well-known Member
- Joined
- Nov 16, 2016
- Messages
- 788
- Office Version
- 365
- Platform
- Windows
Hi,
i have the following
StartTimer is actually called from button within a Userform if it matters
Loader is the sub with all the code that runs and updates captions etc... on the Userform
Below is also assigned to a button in userform but doesnt stop anything
appreciate any help
i have the following
StartTimer is actually called from button within a Userform if it matters
VBA Code:
Public Sub StartTimer()
Loader
RunWhen = Now + TimeValue("00:01:00")
Application.OnTime EarliestTime:=RunWhen, Procedure:="StartTimer", Schedule:=True
Debug.Print "STARTED"
End Sub
Loader is the sub with all the code that runs and updates captions etc... on the Userform
Below is also assigned to a button in userform but doesnt stop anything
VBA Code:
Public Sub StopTimer()
On Error Resume Next
Application.OnTime EarliestTime:=RunWhen, Procedure:="StartTimer", Schedule:=False
On Error GoTo 0
Debug.Print "STOPPED"
End Sub
appreciate any help