how to stop program in a big loop?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, everyone
Right now I wanna do a time-comsuming loop in excel programming, for
example:

for i = 0 to 100000
for j = 0 to 10000
'my parts
doEevents
next
next

during run time, I still wanna use a "Cancel" button to let user have choice
to stop it during run time? how to do it, Pls advice
 
I suspect that the include of "DoEvents" in the inner
portin of youre loop should do the trick. You havent
turned anything (screen updating etc) off have you?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top