Hi
i'am trying to add some values from worksheet2("jan") into a password protected worksheet1("staff"). Password = "123"

I'am able to insert a blank row into worksheet1 (on the fifth row), but my code allways fails when i try to past the values. error 1004
I'am using a commandbutton on worksheet "Jan" below my code:

Option Explicit

Sub Knop1_Klikken()
on error goto ErrorRoutine
Range ("a2:e2").select
Selection.Copy
Worksheets("staff").Select
Worksheets("staff").activate
Worksheets("staff").Unprotect ("123")
Range("A5").Select
Range("A5").EntireRow.Insert Shift:=xlShiftDown
Range("a5:e5").Locked = False
ActiveSheet.PasteSpecial Paste:=xlPasteValue 'here occurs the error 1004, paste or pastespecial don't matters
Application.CutCopyMode = False
Worksheets("staff").Protect ("123")

exitroutine:
Exit Sub
foutroutine:
MsgBox Err.Number & " " & Err.Description
resume next

End Sub


What i'am doing wrong ??

many thanks to figure this out with me, Padob