Disable Ctrl-Break

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
 
G

Guest

Try this


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

Mike
 
N

Norman Jones

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

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

Top