Hi,
Does anyone give me some suggestion?
When I close the form, but some process is still running.I don't know how to handle this kind of situation. What I want to do is that stop all processes first and then close form automatically.
Private Sub Command1_Click()
'Do process 1
Call sleep(10)
'Do process 2
Call sleep(10)
End Sub
Private Sub sleep(ByVal slp As Double)
Dim start
start = Timer
Do While (Timer < (slp + start))
DoEvents
Loop
End Sub