Hi,
I'm trying to create a lap time in Excel which also features a Pause button. So far, I have managed to create Start and Lap buttons, with the following code:
Sub StartButton_Click()
Range("A:B").ClearContents
Range("A1") = "Start"
startTime = Timer
End Sub
---
Sub LapButton_Click()
Dim finalTime As Single, lr As Long
finalTime = Timer - startTime
lr = Cells(Rows.Count, "A").End(xlUp).Row + 1
Cells(lr, "A") = Format(finalTime, "0.000")
If lr = 2 Then Cells(lr, "B") = Cells(lr, "A")
If lr > 2 Then Cells(lr, "B") = Cells(lr, "A") - Cells(lr - 1, "A")
End Sub
---
I want to create a Pause button which - unsurprisingly! - will allow me to pause the timer when I press it, and then allow the timer to continue where it left off after pressing it again (or by pressing another button if need be). I want all the data from before the pause to be saved as well, as I'm taking averages of the most recent laps.
I've tried a couple of different codes but had nothing which works at all at the moment. Any suggestions / advice would be greatly appreciated!
Bookmarks