Do you mean something like this?
A1 would have to be locked.
Public Sub CheckProtection()
On Error GoTo PROTECTED
Range("A1").Value = "Not Protected"
Exit Sub
PROTECTED: ActiveSheet.Unprotect: Range("A1").Value = "Protected"
ActiveSheet.Protect
End Sub
I wanted the logic to be clear to the OP. Or;
I just like the way "True" looks on a page. Or;
We haven't gotten that far yet in the Programming with Prussian
Efficiency course I'm taking. Or even;
I'm just a dope.
There may others. Take your pick.
SteveM
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.