mdmackillop
11-25-2004, 11:59 AM
Hi all,
I posted this in "another place" to repeat some code at intervals. Is there any potential memory or other problem in looping code like this?
Private Sub Document_Open()
Application.OnTime When:=Now + TimeValue("00:00:05"), _
Name:="Check1"
End Sub
Sub Check1()
Application.OnTime When:=Now + TimeValue("00:00:05"), _
Name:="Check2"
If ActiveDocument.Saved = False Then
MsgBox Now()
ActiveDocument.Save
End If
End Sub
Sub Check2()
Application.OnTime When:=Now + TimeValue("00:00:05"), _
Name:="Check1"
If ActiveDocument.Saved = False Then
MsgBox Now()
ActiveDocument.Save
End If
End Sub
I posted this in "another place" to repeat some code at intervals. Is there any potential memory or other problem in looping code like this?
Private Sub Document_Open()
Application.OnTime When:=Now + TimeValue("00:00:05"), _
Name:="Check1"
End Sub
Sub Check1()
Application.OnTime When:=Now + TimeValue("00:00:05"), _
Name:="Check2"
If ActiveDocument.Saved = False Then
MsgBox Now()
ActiveDocument.Save
End If
End Sub
Sub Check2()
Application.OnTime When:=Now + TimeValue("00:00:05"), _
Name:="Check1"
If ActiveDocument.Saved = False Then
MsgBox Now()
ActiveDocument.Save
End If
End Sub