sstjacques
asked on
Cancel event
I'm looking for a way to kill all processing with a cancel button without exiting the program. In fact, I'm using a timer to verify a condition and I want to exit the function running...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Private bCancel As Boolean
Private Sub Command1_Click()
Do
'Do your processing
If bCancel Then Exit Do
DoEvents
Loop 'Until ...
End Sub
Private Sub Command2_Click()
'Stop the processing
bCancel = True
End Sub