business_analyst
Board Regular
- Joined
- Jun 5, 2009
- Messages
- 99
Hello all,
So I have a Userform, which contains a button then when clicked, directs the user to a worksheet where they have to enter information into certain cells. I am trying to protect this worksheet, except for this specific range of cells, which I would like to leave unprotected. I tried using the "Locked" property, but it does not seem to be working.
I got that form of code right of the Microsoft website, but it does not seem to work. the protection works, but it protects the entire sheet.
So I have a Userform, which contains a button then when clicked, directs the user to a worksheet where they have to enter information into certain cells. I am trying to protect this worksheet, except for this specific range of cells, which I would like to leave unprotected. I tried using the "Locked" property, but it does not seem to be working.
Code:
Private Sub cmd_02_next_Click()
Sheets("Distribution").Activate
Sheets("Distribution").Range("C8:L78").Locked = False
Sheet15.Protect Password:="test"
End Sub