apache8119
New Member
- Joined
- Jul 12, 2012
- Messages
- 34
I am putting together a worksheet that accepts user data. When the user clicks on a cell to sign off requesting the data they input it locks the input cell and a box opens to accept their password. When the correct password is entered it populates the activeCell with their initials and the date next to it. As it goes to the next row down it locks everything above it. All of this is working fine, however if the line below it locks everything above it and the row above hasnt had the intials entered into it already it will not allow you to sign it off. I want to be able to unlock all locked cells and then relock them once the data has been entered. How can I do this I tried doing a selection.locked = false but it gives me an error " Unable to set the locked property of the range class." Please help.
This is what my code looks like
If TextBox1.Value = strPass Then
Range("B8:O8").Select<--This is what I added to try and unlock the cell before it is locked later in the code
Selection.Locked = False
Unload UserForm57
On Error Resume Next
ActiveSheet.Cells(8, 15) = Now()
ActiveCell = " AB "
This is what my code looks like
If TextBox1.Value = strPass Then
Range("B8:O8").Select<--This is what I added to try and unlock the cell before it is locked later in the code
Selection.Locked = False
Unload UserForm57
On Error Resume Next
ActiveSheet.Cells(8, 15) = Now()
ActiveCell = " AB "