Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default 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
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
How to paste text into a comment box using toolbar commands Halifax New Users to Excel 4 January 18th 09 05:45 AM
disabling the copy paste function in a cell sam Excel Worksheet Functions 0 February 22nd 06 02:10 PM
Disabling ALL commands on CELL Shortcut menu Peter Rooney Excel Programming 3 August 16th 05 03:00 PM
My cut, copy and paste commands are not working when I right clic. Cosmicblu Excel Discussion (Misc queries) 0 April 13th 05 08:01 PM
Disabling Commands Loomah Excel Programming 1 January 16th 04 12:52 PM


All times are GMT +1. The time now is 08:44 AM.

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

About Us

"It's about Microsoft Excel"