ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disabling the CONTROL + BREAK shortcut key function - HAVING PROBLEM - MY CODE DOES NOT WORK (https://www.excelbanter.com/excel-programming/287955-disabling-control-break-shortcut-key-function-having-problem-my-code-does-not-work.html)

Marcello do Guzman

Disabling the CONTROL + BREAK shortcut key function - HAVING PROBLEM - MY CODE DOES NOT WORK
 
I have used the the following VBE code in the 'This Workbook' module

'This disables the ALT+F8, ALT+F11 and CONTROL+BREAK shortcut keys

Private Sub Workbook_Open()

Application.OnKey "%{F11}", ""
Application.OnKey "%{F8}", ""
Application.OnKey "^{BREAK}", ""

End Sub


'This enables the above shortcut keys

Private Sub App_WorkbookBeforeClose(ByVal Wb As Workbook, _
Cancel As Boolean)

TestEnableOnKey

End Sub


However, the CONTROL + BREAK shortcut function does NOT work. I am
still get the box that allows you to RUN, DEBUG or CANCEL. Is there
anyway to get this to work?

Need the VBE code and where exactly it should be placed.

Thanks in advance,



Marcello

email:


All times are GMT +1. The time now is 11:42 AM.

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