Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Disable Ctrl-Break

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

--
Cheers
Nigel




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Disable Ctrl-Break

Hi Nigel,

See VBA help for the EnableCancelKey property.


---
Regards,
Norman



"Nigel" wrote in message
...
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

--
Cheers
Nigel






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Disable Ctrl-Break

Hi Nigel,

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?


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


---
Regards,
Norman
Microsoft Excel MVP


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Disable Ctrl-Break

Many thanks - all is now clear

--
Cheers
Nigel



"Norman Jones" wrote in message
...
Hi Nigel,

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?


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


---
Regards,
Norman
Microsoft Excel MVP



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Disable Ctrl-Break

Try this


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

Mike
"Nigel" wrote:

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

--
Cheers
Nigel







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CTRL +BREAK Moiz, ABAC UK Excel Programming 1 November 29th 05 12:56 PM
Ctrl+Alt+Break Tom Excel Programming 0 April 13th 05 12:22 PM
Can Not Get Macro to Break with CTRL-BREAK Break Me? Excel Programming 0 September 8th 04 03:15 AM
How to disable Ctrl+Break No Name Excel Programming 1 April 23rd 04 02:17 PM
How to disable the Ctrl+Break ? Krzysztof Klimczak Excel Programming 1 July 31st 03 02:21 PM


All times are GMT +1. The time now is 09:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"