Hello All,
Looking for a way to lock all cells before today's date.
In fact, the only cells I want people to be able to edit would be the ones with the drop-down option (data validation) already given to them.
I've tried playing around with the following bit of code I got from searching on here, but cant seem to get it working properly.
"Private Sub Workbook_Open()
Dim i As Long
With Sheets("Sheet1")
.Unprotect "test"
.Cells.Locked = False
For i = 4 To .UsedRange.Columns.Count
If .Cells(3, i) < Date Then .Columns(i).Locked = True
Next
.Protect "test"
End With
End Sub"
I'd greatly appreciate it, if someone could help me out with this.
The password for the file is "[email protected]"
Thanking you in advance,
Nat
[ATTACH]n1205186[/ATTACH]