Hi All
I have a bit of code to help me Paste Values
I recorded part of it and adapted it afterwards. You will notice I have a line to check for locked cells, this does its job if the cell selected is locked. However if the cell selected is unlocked and the cell below is locked the code still excutes and pastes.
I am not sure how to make the code exit if any of the possible target cells are locked.
Is there a way to achieve what I need
Thanks
Partjob
I have a bit of code to help me Paste Values
Code:
Sub PastSpec()
If Selection.Locked = True Then Exit Sub
On Error GoTo ErrHan
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ErrHan:
Exit Sub
End Sub
I am not sure how to make the code exit if any of the possible target cells are locked.
Is there a way to achieve what I need
Thanks
Partjob