Data Validation and Pasting

AllisterB

Board Regular
Joined
Feb 22, 2019
Messages
120
Office Version
  1. 365
Platform
  1. Windows
In my workbook I have a sheet where all cells are unlocked. The sheet needs to be unprotected to allow pasting onto the sheet below row 8. After pasting the sheet is protected again.

Cell A1 of the sheet has Data validation (a list of two possible values) and I do not want the user pasting into it . if they to I want DV to prevent it.

How do I prevent pasting into cell A1 - I am open to VBA solutions.

Thank you

Allister
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
It is simple to prevent user pasting into rows 1 to 8 as follows
- Right-click on sheet tab\ click View Code \Paste code below into the window which opens
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Intersect(Target, Range("1:8")) Is Nothing Then Application.CutCopyMode = False
End Sub

If you are asking for help with unprotecting the sheet ....
- is it protected with a password ?
- what should trigger the sheet to be unprotected ?
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,457
Members
449,083
Latest member
Ava19

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