What you need to so is specify the raneg of cells that remains unlocked before you protect the worksheet.
You can do this manually, select those cells that will not be locked and the protect the worksheet allowing only the unlocked cells to be selected.
You can do this once manually using the same password as you have in the code then when the van code protects it it remains that wya.
Add the following parameter to the protect this will permit VBA code to edit ANY cell without needing to unprotect the sheet when using vba.
Hope this points you in the right direction
Bookmarks