Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

Cannot stop code with tight loop using ctrl-break

I  cannot get code with a tight loop (series of ADODB commands) to stop when I hit ctrl-break unless I put in a DoEvents statement to execute every 100 iterations of the loop. When the code does stop it is always on the DoEvents statement and the CPU is still running at 100% and I cannot step forward from the DoEvents statement, only continue execution with F5. Any ideas on how to be able to stop code in tight loops using ctrl-break and be able to step forward fronm the stopping point?
0
SimonKravis
Asked:
SimonKravis
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:
are you using a counter ?

try using

if counter=100 then stop
0
 
SimonKravisAuthor Commented:
I need the flexibility of using a user-initiated action rather than satisfacyion of a preset condition, which will certainly work.
0
 
dannywarehamCommented:
0
 
dannywarehamCommented:
Glad to help :-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now