Hello,

I really hope some genius of you vb gurus can help me out here. I'm sure the solution must be simple, but *damn* I've been trying and I can't get out of it.

Let's say I've got a control1 on form1. In the Control1_Click Sub, I just have a counter, that works like this:

Private Sub Control1_Click
Dim a as Long
For a = 1 to 100000000
'What here??????
next a
End Sub

What I need is to be able to STOP this counter from going on when the ESCAPE key is pressed on the keyboard, AT ANY MOMENT.

I want just a stupid trigger that allows me to exit the Sub!

Right now, the counter simply has to finish before I can actually access to any other part of the program.

Please help me out!!

Thank you very very much in advance,

R.