Disable Cut function only from worksheet only (VBA)

Status
Not open for further replies.

mizogy

New Member
Joined
Jul 5, 2011
Messages
40
Office Version
  1. 365
Platform
  1. Windows
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?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Duplicate to: Disable 'Cut' function from worksheet only

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,974
Messages
6,122,536
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top