This is the code i'm currently using. but it does not work if the page is protected were you can select any cell
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Count > 1 Then Exit Sub
If Target.Row < 10 Then Exit Sub
If Target.Row > 28 Then Exit Sub
If Target.Row Mod 2 <> 0 Then Exit Sub
Application.ScreenUpdating = False
ActiveSheet.Unprotect
Cells(Target.Row, 4).Copy
Range("$D$4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.ScreenUpdating = True
End Sub
How do i make it so this code works even when the whole page is protected and your not able to select any cells