Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See inline comments
-- Regards Andy Wiggins www.BygSoftware.com Home of "Save and BackUp", "The Excel Auditor" and "Byg Tools for VBA" "turk5555" wrote in message ... This code disables the shortcut key ALT+F8 which displays the MACROS list box and the shortcut key ALT+F11 which displays the Visual Basic Editor. (NOTE: Your original code for enabling the shortcut keys upon closing the workbook was not correct. I found the above version that works) The code was tested in Excel XP before posting - it works in XP - which version are you using? When I open the workbook (workbook 1) that contains the above code this works fine. If I open another workbook (workbook 2), and try to use the above shortcut keys these shortcut keys remain disabled. If I close the workbook 1, these shortcut keys remain disabled and I can't use them in workbook 2. In order to enable these shortcut keys it is necessary to close workbook 2 and closedown (exit) Excel, then open workbook 1 and closedown Excel again. When I open workbook 2 the shortcut keys are enabled. Here are the notes from my first answer together with the Activate and DeActivate procedures. Did you use them? .... You also need to consider what happens when a user moves to and from that workbook to another. These procedures (again placed in "ThisWorkboo") will only allow the keys to be disabled when your main workbook is active. Private Sub Workbook_Activate() TestDisableOnKey End Sub Private Sub Workbook_Deactivate() TestEnableOnKey End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disabling certain keys on keyboard | Excel Discussion (Misc queries) | |||
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets | Excel Discussion (Misc queries) | |||
Use of Ctrl/end keys - Excel 2002 | Excel Discussion (Misc queries) | |||
cut & paste with short cut keys (ctrl C V) with absolute cell refe | Excel Discussion (Misc queries) | |||
Disabling Shortcut Hot Keys | Excel Programming |