Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disabling of Cut and Paste commands on CELL
Hi All,
Please advise how to disable cut and paste on cells right click menu, on the kyboard (Ctrl+X, Ctrl+V) and from the "Edit" menu. Thanks in advance! Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disabling of Cut and Paste commands on CELL
Hi Mark
See the VBA help for Onkey for the shortcuts And you can use this Sub MenuControl_Enabled_False() ' Excel 97 - 2003 Dim Ctl As CommandBarControl Dim Cbar As Integer On Error Resume Next For Cbar = 1 To Application.CommandBars.Count For Each Ctl In Application.CommandBars(Cbar).Controls Application.CommandBars(Cbar).FindControl(ID:=21, _ Recursive:=True).Enabled = False Application.CommandBars(Cbar).FindControl(ID:=22, _ Recursive:=True).Enabled = False Next Ctl Next Cbar On Error GoTo 0 End Sub Sub MenuControl_Enabled_True() ' Excel 97 - 2003 Dim Ctl As CommandBarControl Dim Cbar As Integer On Error Resume Next For Cbar = 1 To Application.CommandBars.Count For Each Ctl In Application.CommandBars(Cbar).Controls Application.CommandBars(Cbar).FindControl(ID:=21, _ Recursive:=True).Enabled = True Application.CommandBars(Cbar).FindControl(ID:=22, _ Recursive:=True).Enabled = True Next Ctl Next Cbar On Error GoTo 0 End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Mark" wrote in message ... Hi All, Please advise how to disable cut and paste on cells right click menu, on the kyboard (Ctrl+X, Ctrl+V) and from the "Edit" menu. Thanks in advance! Mark |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disabling of Cut and Paste commands on CELL
thank you Ron!
"Ron de Bruin" wrote: Hi Mark See the VBA help for Onkey for the shortcuts And you can use this Sub MenuControl_Enabled_False() ' Excel 97 - 2003 Dim Ctl As CommandBarControl Dim Cbar As Integer On Error Resume Next For Cbar = 1 To Application.CommandBars.Count For Each Ctl In Application.CommandBars(Cbar).Controls Application.CommandBars(Cbar).FindControl(ID:=21, _ Recursive:=True).Enabled = False Application.CommandBars(Cbar).FindControl(ID:=22, _ Recursive:=True).Enabled = False Next Ctl Next Cbar On Error GoTo 0 End Sub Sub MenuControl_Enabled_True() ' Excel 97 - 2003 Dim Ctl As CommandBarControl Dim Cbar As Integer On Error Resume Next For Cbar = 1 To Application.CommandBars.Count For Each Ctl In Application.CommandBars(Cbar).Controls Application.CommandBars(Cbar).FindControl(ID:=21, _ Recursive:=True).Enabled = True Application.CommandBars(Cbar).FindControl(ID:=22, _ Recursive:=True).Enabled = True Next Ctl Next Cbar On Error GoTo 0 End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Mark" wrote in message ... Hi All, Please advise how to disable cut and paste on cells right click menu, on the kyboard (Ctrl+X, Ctrl+V) and from the "Edit" menu. Thanks in advance! Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to paste text into a comment box using toolbar commands | New Users to Excel | |||
disabling the copy paste function in a cell | Excel Worksheet Functions | |||
Disabling ALL commands on CELL Shortcut menu | Excel Programming | |||
My cut, copy and paste commands are not working when I right clic. | Excel Discussion (Misc queries) | |||
Disabling Commands | Excel Programming |