How to disable Keyboard shortcut
Hello VB Experts,
I am the same person that recently post a problem about BeforePrint Event. I get away with that problem. What I did is to put this code to my open event. For Each bar In Application.CommandBars bar.Enabled = False Next bar My problem now is how to disable keyboard shortcut (e.g. ctrl+o) so that what will be left for my user is my macro that I plan to assign to an embedded object. BTW - Thanks to those who care to help sp. William and Tom Thanks again in advance! Jon-jon |
How to disable Keyboard shortcut
You could assign the shortcut to your own macro
Sub DoNothing() End Sub --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "JON-JON" wrote in message ... My problem now is how to disable keyboard shortcut (e.g. ctrl+o) so that what will be left for my user is my macro that I plan to assign to an embedded object. |
How to disable Keyboard shortcut
Just redefine the key with the OnKey method. You can either assign those
shortcuts to your macro or disable them. See the help in VBA on the OnKey method for the details of the arguments to OnKey (2nd argument) and the effect of each type of argument (marco, null string, no argument). -- Regards, Tom Ogilvy "JON-JON" wrote in message ... Hello VB Experts, I am the same person that recently post a problem about BeforePrint Event. I get away with that problem. What I did is to put this code to my open event. For Each bar In Application.CommandBars bar.Enabled = False Next bar My problem now is how to disable keyboard shortcut (e.g. ctrl+o) so that what will be left for my user is my macro that I plan to assign to an embedded object. BTW - Thanks to those who care to help sp. William and Tom Thanks again in advance! Jon-jon |
How to disable Keyboard shortcut
Hi Jon-jon,
I just realized I answered this thread before, but you were also asking about the right-click menu (PLY). Doesn't seem like the kind of thing to endear you with others that work with Excel. I wouldn't want *anyone* messing with MY toolbars. You can create your own macro that does nothing and assign keyboard shortcut of Ctrl+o to it. I don't know how quickly you or anyone else will find the macro with that shortcut, should it present problems later on. Been looking for that for awhile. If you search the Excel newsgroups http://groups.google.com/advanced_gr...Excel*&num=100 search all words: ply menu group:*Excel* As you may notice a good deal of the postings were complaints about Right-Click not working. Tom Ogilvy posted several links concerning the PLY menu http://google.com/groups?threadm=uxO...%40cppssbbsa04 --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "JON-JON" wrote ... I am the same person that recently post a problem about BeforePrint Event. I get away with that problem. What I did is to put this code to my open event. For Each bar In Application.CommandBars bar.Enabled = False Next bar My problem now is how to disable keyboard shortcut (e.g. ctrl+o) so that what will be left for my user is my macro that I plan to assign to an embedded object. |
How to disable Keyboard shortcut
Sorry got that mixed up the right click menu is the Cell command bar
not the Ply Command Bar which is for the worksheet tabs, and you didn't ask for either one, probably got it mixed up with Lori's question in another newsgroup. You already answered your own question and so did others. "JON-JON" wrote ... My problem now is how to disable keyboard shortcut (e.g. ctrl+o) so that what will be left for my user is my macro that I plan to assign to an embedded object. |
How to disable Keyboard shortcut
Of course after my codes served it purpose, I will reverse all changes that
I done through the code also. Unless, i want to get fired. Thanks, Jon-jon "David McRitchie" wrote in message ... Hi Jon-jon, I just realized I answered this thread before, but you were also asking about the right-click menu (PLY). Doesn't seem like the kind of thing to endear you with others that work with Excel. I wouldn't want *anyone* messing with MY toolbars. You can create your own macro that does nothing and assign keyboard shortcut of Ctrl+o to it. I don't know how quickly you or anyone else will find the macro with that shortcut, should it present problems later on. Been looking for that for awhile. If you search the Excel newsgroups http://groups.google.com/advanced_gr...Excel*&num=100 search all words: ply menu group:*Excel* As you may notice a good deal of the postings were complaints about Right-Click not working. Tom Ogilvy posted several links concerning the PLY menu http://google.com/groups?threadm=uxO...%40cppssbbsa04 --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "JON-JON" wrote ... I am the same person that recently post a problem about BeforePrint Event. I get away with that problem. What I did is to put this code to my open event. For Each bar In Application.CommandBars bar.Enabled = False Next bar My problem now is how to disable keyboard shortcut (e.g. ctrl+o) so that what will be left for my user is my macro that I plan to assign to an embedded object. |
All times are GMT +1. The time now is 04:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com