LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Disable Command Bar Control

I am trying to disable the "cut" control in the "edit" menu in the Command
Bar, as well as in any other menu where "cut" may appear. So far the below
code, which I input into the specific sheet's code window, works, but it does
not disable the key board shortcut "control x". That is but a minor problem.
The main issue is that the code disables the "cut" control in all of my
Excel files. Any ideas on how I could disable the keyboard short cut as well
make the code apply only to a particular sheet rather than to my Excel in
general? Any help is greatly appreciated.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Ctrl As Office.CommandBarControl
For Each Ctrl In Application.CommandBars.FindControls(ID:=21)
Ctrl.Enabled = False
Next Ctrl
End Sub
 
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
Disable Command Bar Edit Control iperlovsky Excel Programming 6 December 12th 08 06:05 PM
Disable control Francis Ang[_3_] Excel Programming 3 October 10th 06 12:16 AM
disable control vj5 Excel Programming 0 July 6th 06 07:46 AM
disable control vj5 Excel Programming 0 July 6th 06 07:45 AM
Disable Control s Dave[_18_] Excel Programming 0 July 17th 03 05:59 PM


All times are GMT +1. The time now is 06:35 AM.

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

About Us

"It's about Microsoft Excel"