Malcolm torishi
Board Regular
- Joined
- Apr 26, 2013
- Messages
- 219
I have the following vba time stamp code in a module that does not quite do what I want it to do. I would like the clock to start automatically rather than having to go into the marco and run “Recalc”. Also I would like to close the spread sheet in a normal way rather than when i close the spread sheet the spread sheet closes for a split second and then reopens because the clock is still in “Recalc”
Can any one suggest what extra code I would need to add to the following
thanks
Dim SchedRecalc As Date
Sub Recalc()
With Sheet1.Range("G1")
.Value = Format(Time, "hh:mm:ss AM/PM")
End With
Call Settime
End Sub
Sub Settime()
SchedRecalc = Now + TimeValue("00:00:01")
Application.OnTime SchedRecalc, "Recalc"
End Sub
Can any one suggest what extra code I would need to add to the following
thanks
Dim SchedRecalc As Date
Sub Recalc()
With Sheet1.Range("G1")
.Value = Format(Time, "hh:mm:ss AM/PM")
End With
Call Settime
End Sub
Sub Settime()
SchedRecalc = Now + TimeValue("00:00:01")
Application.OnTime SchedRecalc, "Recalc"
End Sub