Hi PY_
error 2029 is cell name error
try..
 Range("a" & j & ":R" & j).Locked = true