Edit - cells are not merged anymore!
Thanks Lenze, I thought that might be the problem (I did have the worksheet protected). So I put in your code. Then I thought, if the username = the supervisor's name I don't care what cell is unprotected. I can just leave the workbook unprotected and they can write anywhere. Then when the workbook gets mailed back to others, the whole thing is locked back up.
So my code looks like;
Sheets("sheet1").Range("a1").Value = Environ("username")
If Environ("username") = Range("H5") Then
ActiveSheet.Unprotect
Else
ActiveSheet.Protect
End If
End Sub
It isn't working. So, I tried pasting it everywhere thinking it might have to reside in ThisWorkbook or a Sheet module. So far no luck. Any more suggestions?
The way I am testing this is to type my name in the Supervisor cell and see if it will unlock the workbook, then type in any other name to see if it will lock.