I'm using the following code to give an alert 10 seconds after I input a value into a cell
However, after I dismiss the pop up box and input a new value, I get a run-time error '1004": method 'ontime' of object '_application' failed.
Any advice?
VBA Code:
Sub StartTimer()
Static SchedSave
If SchedSave <> 0 Then
[COLOR=rgb(184, 49, 47)]Application.OnTime SchedSave, "Alert", , False[/COLOR]
End If
SchedSave = Now + TimeValue("00:00:10")
'Timer set as 10 minutes, adjust as required
Application.OnTime SchedSave, "Alert", , True
End Sub
Sub Alert()
MsgBox "!!!"
End Sub
However, after I dismiss the pop up box and input a new value, I get a run-time error '1004": method 'ontime' of object '_application' failed.
Any advice?