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.
 
Back
Top