WalkerEvans
Technical User
I password protect everything built for general use around here; it keeps inquisitive fingers out of my formulas and confines entries to only those places where data should be entered. I'm now working on an Excel project which requires that a small range of cells be protected until all of the other data has been entered. This seems to require the use of the "LOCKED" property, which I have never needed before, so I've spent a lot of time in the Help file while building my code
The problem is that I get the above error, even though my code compiles and is in accord with the syntax in the Help file. Here is the code:
Code:
Sub DoSegs()
Application.Goto reference:=Range("j5")
ActiveWorkbook.Unprotect (****)
[highlight #FF99FF]Worksheets("name").Range("j5:j14").Locked = False[/highlight]
ActiveWorkbook.Protect (****)
... code continues
The error occurs on the highlighted line. I've tried every variation I can think of to no avail. Can anyone see what is causing this?
----------------------------------------------------------------------------------
[small]"Did you hear about the guy who refused to pay his exorcist?[/small]
He was re-Possessed."