Disable "CUT" in excel + vb
This will disable the user from using ctrl + X (i.e. cut) option in excel.
Sub ctrlX()
MsgBox "You are not allowed to Cut a cell. You can use copy instead."
End Sub
Sub disableCut()
'Disable Cut button
Application.CommandBars("Standard").Controls.Item("Cut").Enabled = False
Application.CommandBars("Edit").Controls.Item("Cut").Enabled = False
Application.OnKey "^x", "ctrlX"
Application.CellDragAndDrop = False
End Sub
how do we enable the function ctrl+x if it is been diabled