> With the script, I am using a Do...DoEvents...Loop with the time being
> updated before the DoEvents command.
If he doesn't need to break into the macro, make it run say every minute
by putting
Application.Wait Now+TimeValue("00:01:00")
in the loop.
If he needs to break in, you can use Application.OnTime to run your
update macro once but it's a bit more complicated:
Dim NextTime As Date ' at top of standard module
Sub Auto_Open()
StartUpdate
End Sub
Sub Auto_Close()
StopUpdate
End Sub
Sub StartUpdate()
NextTime = Now + TimeValue("00:01:00")
Application.OnTime Now, "DoUpdate"
End Sub
Sub StopUpdate()
If NextTime<>0 Then
Application.OnTime Now, "DoUpdate",Schedule:=False
NextTime = 0
End If
End Sub
Sub DoUpdate()
' your code to do one update of the screen
StartUpdate
End Sub
Hope this helps
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
Jesse - 22 May 2004 13:56 GMT
Thanks Bill- the first solution worked perfectly.
Jesse.
> > With the script, I am using a Do...DoEvents...Loop with the time being
> > updated before the DoEvents command.
[quoted text clipped - 39 lines]
> MVP - Microsoft Excel, Oxford, England
> No email replies please - respond to newsgroup