Hi, I got in my program a very long code running, and it takes some time to finish executing. But sometimes I want to stop it, but I can't. Is there any way of doing this? Something using timers and the GetAsyncKeyState funcion maybe... Like this:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
If (GetAsyncKeyState(vbKeyEnd)) Then 'WHEN END IS PRESSED
'STOP THE CODE
Understand? I hope you do, and thanks!