Protected Sheet

D

DonB

I'd like to show some sort of indication on one sheet if a different sheet is
protected or not. Is there an "IF" function for this?
 
J

Jim Thomlinson

There is no built in function in XL that will tell you whether a sheet is
protected or not. With VBA you could write a function that would give you
that info. That being said there are certain limitations to such a function
since changing the protection on a worksheet does not fire off a calculation.

So in short. Nothing built in and anything you create via VBA will be
marginal at best.
 
T

Tim879

you could use the attached function:

Function Is_Worksheet_Protected(CellRef As Range) As Boolean
Application.Volatile
If CellRef.Parent.ProtectContents Then x = True
If CellRef.Parent.ProtectDrawingObjects Then x = True
If CellRef.Parent.ProtectScenarios Then x = True

Is_Worksheet_Protected = x

End Function
 
Top