Stop the execute of command if it execute more than 3 seconds
Posted on 2006-03-23
Is it possible to stop the execute of a command if it executes more than 3 seconds?
If the command executes successfully, prompt a "Command execute success"
If the command executes failed, prompt a "Command execute failed"?
Private Sub Command1_Click()
'if it executes more than 3 seconds, stop it. This is just an example, and obviously it won't stop within 3 seconds.
Private Sub NonStopLoop()
Dim i As Integer
Do While True
i = 1