Private Sub Workbook_Open()
'Clear the clipboard
Application.CutCopyMode = False
'Disable CTRL + C etc.
Application.OnKey "^{c}", "" 'Copy
Application.OnKey "^{v}", "" 'Paste
Application.OnKey "^{x}", "" 'Cut
'If the itemns below are already disabled, ignore errors
On Error Resume Next
'Disable right click menu items
ShortcutMenus(xlWorksheetCell).MenuItems("Cut").Delete
ShortcutMenus(xlWorksheetCell).MenuItems("Copy").Delete
ShortcutMenus(xlWorksheetCell).MenuItems("Paste").Delete
ShortcutMenus(xlWorksheetCell).MenuItems("Paste Special...").Delete
'Disable items on the Edit menu
With CommandBars("Worksheet Menu Bar")
With .Controls("Edit")
.Controls("Cut").Enabled = False
.Controls("Copy").Enabled = False
.Controls("Paste").Enabled = False
.Controls("Paste Special...").Enabled = False
End With
End With
'Reset error handling to default
On Error GoTo 0
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
With CommandBars("Worksheet Menu Bar")
With .Controls("Edit")
.Controls("Cut").Enabled = True
.Controls("Copy").Enabled = True
.Controls("Paste").Enabled = True
.Controls("Paste Special...").Enabled = True
End With
End With
End Sub