View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Michael Michael is offline
external usenet poster
 
Posts: 791
Default Disable Command Bar Edit Control

And if you don't want to write the nono sub, do this:
Application.OnKey "^x", ""
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Michael" wrote:

You're probably refering to Ctrl X
This is how you do that:
'Divert Ctrl + X = Cut
Application.OnKey "^x", "NoNo"

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"iperlovsky" wrote:

I am attempting to use this sub routine to disable the cut control under the
Edit menu and all the sub menus, but the menu is still allowing me to cut. I
have Excel 2003. Any help is appreciated.

Sub MenuControl_False()
Dim Ctrl As Office.CommandBarControl
For Each Ctrl In Application.CommandBars.FindControls(ID:=21)
Ctrl.Enabled = False
Next Ctrl
End Sub