ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to DISABLE THE CONTROL BREAK shortcut keys (https://www.excelbanter.com/excel-programming/287327-how-disable-control-break-shortcut-keys.html)

Marcello do Guzman

How to DISABLE THE CONTROL BREAK shortcut keys
 
I used the ONKEY event to disable the shortcut keys, but I cannot get
it to work when you press CONTROL + BREAK keys to interrupt macros and
eliminate the RUN, DEBUG, CANCEL box that appears when you do this.

Can you please help me with the VBA code that I would use to disable
the CONTROL + BREAK keys.


Please email the solution at:

thank you in advance,


MARCELLO


Email:

Colo[_83_]

How to DISABLE THE CONTROL BREAK shortcut keys
 
Hello MARCELLO, :D

Please add this code in the top of your procedure.


Code:
--------------------

Application.EnableCancelKey = xlDisabled

--------------------



---
Message posted from http://www.ExcelForum.com/


Tom Ogilvy

How to DISABLE THE CONTROL BREAK shortcut keys
 
Look in Excel VBA help for the EnableCancelKey method.

--
Regards,
Tom Ogilvy

"Marcello do Guzman" wrote in message
...
I used the ONKEY event to disable the shortcut keys, but I cannot get
it to work when you press CONTROL + BREAK keys to interrupt macros and
eliminate the RUN, DEBUG, CANCEL box that appears when you do this.

Can you please help me with the VBA code that I would use to disable
the CONTROL + BREAK keys.


Please email the solution at:

thank you in advance,


MARCELLO


Email:




Tom Ogilvy

How to DISABLE THE CONTROL BREAK shortcut keys
 
Think it would be advisable to understand what the options are for
enablecancel key rather than just disabling it - thus the recommendation to
read the help file.

--
Regards,
Tom Ogilvy

"Colo " wrote in message
...
Hello MARCELLO, :D

Please add this code in the top of your procedure.


Code:
--------------------

Application.EnableCancelKey = xlDisabled

--------------------



---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 03:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com