Hello, please can anyone help?
I've defined within a module,
>>> use code - tags <<<
When I do I get the Compile Error Window with "UpdateClock" highlighted as an undefined variable.
Any ideas please?
I've defined within a module,
>>> use code - tags <<<
Code:
Option Explicit
Dim NextTick As Date
And am running a small block of code with comments as follows:
Sub UpdateClock()
' using the OnTime event to execute UPdateClock procedure by self calling it
' into a cell (range) named CurrentTime in a worksheet titled Chapters_and_code_trialed
' I'll use a Button to toggle this on assigning UpdateClock(). Use one to toggle it off, StopClock()
'Code reads
Worksheets("Chapters_and_code_trialed").Range("CurrentTime").Value = Time
'Set up the next event five seconds from now
NextTick = Now + TimeValue("00:00:05")
Application.OnTime EarliestTime:=NextTick, Procedure:="UpdateClock"
End Sub
When I do I get the Compile Error Window with "UpdateClock" highlighted as an undefined variable.
Any ideas please?