-
Solved: Locking a Row Question
Hello everyone,
I am having a little trouble locking a row. I do not want to allow input to certain rows if the condition is met. If the Condition is met, I call a routine. Below is the code I currently have. When I run it and test it, I am still able to change the values in the cells. Any advice?
[VBA]Call Lock_Rows(21 + i, 5)
Public Sub Lock_Rows(x, y)
Worksheets("Sheet1").Range(Cells(x, 1), Cells(x, 80)).Locked = True
End Sub
[/VBA]
-
Did you protect the sheet?
-
Hi Kenneth, I learned that after my post. So I made everything unprotected, the picked my rows to Lock and protected the entire sheet. It is working well now. Thanks. I will close this thread.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules