Protected Sheet

  • Thread starter Thread starter DonB
  • Start date Start date
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?
 
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.
 
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
 

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.

Ask a Question

Back
Top