The implementation you suggest is not clear to me. Where should I put
the application.Ontime command, to which function, and how will it solve
my purpose? I understand what you mean by saying that I should not poll
the form so often, but other than the Sleep command (which i don't think
is what i want), I don't know how to delay the polling time.
Application.OnTime would be able to delay polling time, but using it in
the Sub below is not intuitive to me.
What exactly do you mean? Thanks in advance!
Sub MySub
' -- set up code here.
With frmModeless
.Show vbModeless
Do
DoEvents
Loop While Not (.IsCanceled Or .IsDone)
End With
' -- more code here that depends on the form having been done or
' canceled
MsgBox "Done"
End Sub