Hi Phil,
Here's some code for a countdown timer that you might find useful. The first routine is click event code for a button named btnStart that resides on the worksheet of interest (you must create this button).
Private Sub btnStart_Click()
nSecs = 1
StartTime = Time()
EndTime = StartTime + 180 / 86400#
CountDownB4
End Sub
This second block of code must be put into a macro module in the workbook.
Public nSecs As Long
Public StartTime As Date
Public EndTime As Date
Sub CountDownB4()
' This procedure demonstrates the creation of a countdown
' timer in cell B4 on the sheet associated with this event
' code pane. Each time this routine is called it schedules
' itself one second in the future
Const Sec = 1 / 86400#
Dim NextTime As Date
If nSecs <= 180 Then '3 minutes
NextTime = StartTime + Sec * nSecs
Application.OnTime NextTime, "CountDownB4"
'write time into cell B4 as a string
[B4] = Format(Abs(EndTime - NextTime), " n:ss")
nSecs = nSecs + 1
Else
Beep
MsgBox "Time is up", vbExclamation
End If
End Sub
Hopefully this will at least give you a template for how to proceed.
Happy teaching.
Damon
PS. To make the above code more ironclad, and since it is operating asynchronously, you should add a check to make sure when CountDownB4 reschedules itself 1 second in the future, that the time has not already passed due to being delayed by other processing.