Disable Ctrl-Break

  • Thread starter Thread starter Nigel
  • Start date Start date
N

Nigel

Two questions....

How can I disable the Ctrl-Break key strokes to prevent stopping code when
it is running?

If I do disable the Ctrl-Break - is there a way I can set up my own 'break'
command sequence to stop the code running?


Thanks
 
Try this


sub nobreak()
Application.EnableCancelKey = wdCancelDisabled
your code
Application.EnableCancelKey = wdCancelInterrupt
end sub

Mike
 
Hi Nigel,

To specifically address the second question, VBA help
provides an example of the use of a custom cancellation
handler.
 

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

Similar Threads

Disable the PauseBreak key 4
CTRL-BREAK Mac 1
Stopping a macro 13
Diable Ctrl+Break 1
Macro Stops without reason 6
End loop 2
XL2003 VBA: Debuging...can not break or run in break/step mode. 1
Disable auto open 1

Back
Top