Checking with code to see if a Workbook is Protected?

  • Thread starter Thread starter debartsa
  • Start date Start date
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
 
Try this Sam

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