hello everyone,

i have written the folllowing code:

Sub ppppppppppppp()

Worksheets("sheet1").Range("a4:a20").Locked = True
ActiveSheet.Protect Password:="enter your password"



End Sub

i just want to be able to lock the specific range e.g. [Range("a4:a20")], but instead it is protecting/locking the whole worksheet. can someone help/explain to me why it won't let me lock my specific cells/range? thanks