PC Review


Reply
Thread Tools Rate Thread

disable shortcut key from menu control

 
 
caroline
Guest
Posts: n/a
 
      23rd Jan 2008
Hello,
I would like to prevent the user to use Cut from the menu. I managed to
disable the menu item using the code below, but have not managed to disable
the Shortkey Ctrl+X.
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
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      23rd Jan 2008
Note you code is not working correct if the user insert controls

See this page for a way that use the ID
http://www.rondebruin.nl/menuid.htm

See point 3 for the shortcuts
http://www.rondebruin.nl/menuid.htm#useful




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"caroline" <(E-Mail Removed)> wrote in message news:AF4F4799-887B-45C4-AFFF-(E-Mail Removed)...
> Hello,
> I would like to prevent the user to use Cut from the menu. I managed to
> disable the menu item using the code below, but have not managed to disable
> the Shortkey Ctrl+X.
> 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 Context Menu (New-Create Shortcut) =?Utf-8?B?QWFyb24gQ2Fkc3RpbGxv?= Windows XP General 10 28th Nov 2008 04:06 PM
How to disable menu shortcut keys Amil Hanish Microsoft Dot NET Framework Forms 1 25th Aug 2008 08:11 PM
How do I disable the right-click shortcut menu on charts =?Utf-8?B?Um9iYm8=?= Microsoft Excel Programming 0 23rd Feb 2007 12:49 AM
Disable item in shortcut menu =?Utf-8?B?RGFsZSBGeWU=?= Microsoft Access Form Coding 2 12th May 2006 04:40 PM
disable an item in shortcut menu Sam Microsoft Access Form Coding 0 18th Aug 2004 04:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:19 PM.