Hi All
I am trying to find a solution to stop users from cutting and pasting values on a particular worksheet. This to avoid (hidden and protected) formula on the same worksheet from becoming corrupted. I still, however, want to provide the user the ability to copy and paste values.
I used the following code, however it removes the ability to copy and paste values from one cell to another.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.CutCopyMode = False
End Sub
Simply, I want to avoid the ability to cut. Nor, do I want to use code which disables the cut function from their menu for all workbooks / worksheets.
To provide some additional context; the issue is not simply resolved by adding protection to the cells. I require the user to be able to change the value in the cell, either through manual input or copying and pasting values from other cells, for that reason the cell is unlocked. However, I want to avoid the unlocked cell's value being cut and pasted to a corresponding cell. The reason being, formula linking to those cell (that formula being hidden and protected) then becomes corrupted by the cell value being cut and pasted to a cell above or below.
Any ideas - thank you for your help in advance?
I am trying to find a solution to stop users from cutting and pasting values on a particular worksheet. This to avoid (hidden and protected) formula on the same worksheet from becoming corrupted. I still, however, want to provide the user the ability to copy and paste values.
I used the following code, however it removes the ability to copy and paste values from one cell to another.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.CutCopyMode = False
End Sub
Simply, I want to avoid the ability to cut. Nor, do I want to use code which disables the cut function from their menu for all workbooks / worksheets.
To provide some additional context; the issue is not simply resolved by adding protection to the cells. I require the user to be able to change the value in the cell, either through manual input or copying and pasting values from other cells, for that reason the cell is unlocked. However, I want to avoid the unlocked cell's value being cut and pasted to a corresponding cell. The reason being, formula linking to those cell (that formula being hidden and protected) then becomes corrupted by the cell value being cut and pasted to a cell above or below.
Any ideas - thank you for your help in advance?