Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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.





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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.







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
Keyboard Shortcut danno-c[_2_] Excel Discussion (Misc queries) 3 November 30th 09 08:14 PM
keyboard shortcut entee Excel Worksheet Functions 3 October 26th 08 08:03 PM
Keyboard shortcut: something new James Silverton[_2_] Excel Discussion (Misc queries) 3 September 23rd 07 01:15 PM
Disable keyboard shortcuts Pegasus Excel Discussion (Misc queries) 21 July 1st 07 12:23 PM
Keyboard shortcut for Best Fit Ob1Pimpobi Excel Discussion (Misc queries) 1 August 31st 06 01:06 AM


All times are GMT +1. The time now is 10:56 AM.

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

About Us

"It's about Microsoft Excel"