kashyap,
the code is doing nothing because of "on error resume next": the errors are still there, but are not reported anymore.
BUT, it would be good for you to take care of all replies. rorya has already pointed out that you cannot change protection properties. So even if you solve the problem, you will still not have a working solution.
An alternative could be validation, I'm not sure if it suits your needs.
Else you will need code witch watches what you are doing and will UNDO everything which is done within the "locked" cells (wrote locked between " " because they are not really locked)*
best regards,
Erik