Activesheet protection
Hi Rob,
There are 3 protection properties. You can cater for all with
With ActiveSheet
If .ProtectContents = False Or _
.ProtectDrawingObjects = False Or _
.ProtectionMode = False Then
GoTo resetmsg
End If
End With
but you will probably only need ProtectContents.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Rob" wrote in message
...
Excel 2000
Hi,
I have a macro that I want to run only if the worksheet is protected, I've
tried code like: If ActiveSheet.Protection = False Then GoTo ResetMsg
ResteMgs:
MsgBox "Can't run macro!"
Exit Sub
The above doesn't work but I can't figure it out, any pointers most
welcome.
Rob
|