Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Command Bar Edit Control
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Command Bar Edit Control
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Command Bar Edit Control
Read also this:
http://www.mrexcel.com/archive/VBA/1981.html -- 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Command Bar Edit Control
I am trying to disable the "cut" control from all menus in sheet 1.
"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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Command Bar Edit Control
I do not know why but none of these "grey out" (ie, disable) the cut command
from all menus in the sheet. "Michael" wrote: Read also this: http://www.mrexcel.com/archive/VBA/1981.html -- 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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Command Bar Edit Control
Hi,
All the techniques are described here http://www.rondebruin.nl/menuid.htm Mike "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy command is disable under edit menu | Excel Discussion (Misc queries) | |||
Disable the Delete Control in the Edit Menu | Excel Programming | |||
Disable Edit Fill | Excel Programming | |||
Disable Edit Query | Excel Programming | |||
Disable the Edit menu command 'Paste Special' | Excel Programming |