PC Review


Reply
Thread Tools Rate Thread

disable a menu control short key

 
 
caroline
Guest
Posts: n/a
 
      23rd Jan 2008
hello,
I would like to disable the cut control (and its shortkey CtrlX).
I have managed to disable the control by greying the menu item with the
following code but the shortkey still work.
Any idea?
Thanks

Sub preventcut()
' disable cut
Application.CommandBars("Worksheet Menu Bar").Reset
With Application.CommandBars("Worksheet Menu Bar").Controls
.Item(2).Controls(3).Enabled = False
End With
End Sub
Sub resetmenu()
Application.CommandBars("Worksheet Menu Bar").Reset
End Sub



--
caroline
 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      23rd Jan 2008

Look up the "OnKey" method in help.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"caroline"
wrote in message
hello,
I would like to disable the cut control (and its shortkey CtrlX).
I have managed to disable the control by greying the menu item with the
following code but the shortkey still work.
Any idea?
Thanks

Sub preventcut()
' disable cut
Application.CommandBars("Worksheet Menu Bar").Reset
With Application.CommandBars("Worksheet Menu Bar").Controls
.Item(2).Controls(3).Enabled = False
End With
End Sub
Sub resetmenu()
Application.CommandBars("Worksheet Menu Bar").Reset
End Sub
--
caroline
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
disable shortcut key from menu control caroline Microsoft Excel Programming 1 23rd Jan 2008 03:39 PM
disable built-in menu and short-cut key for cut command =?Utf-8?B?dHJhdmlz?= Microsoft Excel Misc 1 21st Jul 2006 05:18 PM
How to disable the pop-up control/system menu? =?Utf-8?B?U2hhcm9u?= Microsoft C# .NET 2 5th Jan 2006 06:20 AM
Disable Control in Tools Menu Juan Sanchez Microsoft Excel Programming 4 30th Sep 2004 09:40 PM
favorites menu : how to disable "full menu after short delay" c sky Windows XP Internet Explorer 1 12th Aug 2003 11:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:46 AM.