Hi,

Refer to above, I have excel which allows users to enter the data in range of A1:d(.xldown), when user update the data in a1:d1 then it should allow user to only edit a2:d2 and protect all ranges including a1:d1 from editing, request anyone of you to help me with the code.

Below is the code, can anyone help me in tweaking the same.
PHP Code: 
Sub AddUserEditRange()
    
Dim ws As Worksheetaer As AllowEditRange
    Set ws 
ThisWorkbook.Sheets("Protection")
    
ws.Unprotect "Excel2003"
    
Set aer ws.Protection.AllowEditRanges.Add("User Range"ws.Range("A1:D1"))
    
aer.Users.Add "Power Users"True
    ws
.Protect "Excel2003"
End Sub 
Thanks in advance

Regards,
GR