Checking with code to see if a Workbook is Protected?

D

debartsa

Hi Everybody,

I'm looking for a method or property (if exists) that will allow return a
Boolean as to whether a Workbook is currently protected or not?

Thanks for any help!
Sam

P.S. I'm working with Excel 97
 
R

Ron de Bruin

Try this Sam

Sub test()
If ActiveWorkbook.ProtectStructure = True Then
MsgBox "The ActiveWorkbook workbook is protected"
End If
End Sub
 

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

Top