Syntax to check protected status of a worksheet?

  • Thread starter Thread starter slingsh0t
  • Start date Start date
S

slingsh0t

I've used ActiveWorkbook.ProtectStructure to return a True/False value
indicating that a workbook is password protected.

Does similar syntax exist for the active sheet? I have tried a number
of variations but can't find it, and for some reason (reason conversion
to XL 2003?) I don't get those popup windows that suggest my next
choice of code words.

Any ideas? Thanks.
 
You can protect a few different things on a worksheet.

Dim wks as worksheet
set wks = activesheet

If wks.ProtectContents _
Or wks.ProtectDrawingObjects _
Or wks.ProtectScenarios Then
msgbox "It's protected"
end if
 

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