Unable cut in workbook
Note that I disable the DragAndDrop feature which is
another form of cut and paste. However, this can be reset
by selecting this option through Tools|Options|Edit
tab|Allow cell drag and drop checkbox. Therefore, I
automatically disable it every time there is a selection
change.
Correct for wordwrap corruption and doubling of leading
periods if it occurs. Paste to the ThisWorkbook module:-
Dim DragAndDropStatus As Boolean
Private Sub Workbook_Open()
With Application
DragAndDropStatus = .CellDragAndDrop
..OnKey "^{x}", ""
..CellDragAndDrop = False
..CommandBars("Cell").Controls("Cut").Enabled = False
..CommandBars("Worksheet Menu Bar").Controls
("Edit").Controls("Cut").Enabled = False
End With
End Sub
Private Sub Workbook_Deactivate()
With Application
..CellDragAndDrop = DragAndDropStatus
..CommandBars("Cell").Controls("Cut").Enabled = True
..CommandBars("Worksheet Menu Bar").Controls
("Edit").Controls("Cut").Enabled = True
End With
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As
Object, ByVal Target As Range)
Application.CellDragAndDrop = False
End Sub
Not rigorously tested. Never used by me so I can't attest
to the practicality.
Regards,
Greg
|