I have a timer that starts with the code below, but I can't figure out a way to stop it with a seperate button. I've also attached the complete worksheet.
Private Sub CommandButton1_Click()
'This is the 20HR Day start button
'Starts, pauses or continues the timer
'Start the timer that determines when the clock should run and not run based on breaks
If TimerStarted = False Then 'No workhour day has been selected yet
TimerStarted = True 'set to True so that if button is hit again, it won't start routine again
DayTimer20
'Make sure our cells are initialized
Initialize
'Set the number of hours that will be worked that day
WorkHours = 9.5
'Copy the takt value to the display area
Range("A1").Value = Range("A14").Value
'Set the 10HR Flag to FALSE
Range("E44").Value = False
'Set to False so that all timers run initially
StopTimer = False
'Start the display takt timer
ShowTimer
'Start the goal timer
Timer
Else
If TimerStarted = True Then 'if it equals false, then do nothing, since it's already running
End If
End If
Bookmarks