Results 1 to 2 of 2

Thread: Query the thisworkbook.protect

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    8

    Query the thisworkbook.protect

    Hi,

    Does anyone know how I can test to see if a workbook has been protected?

    Doing this for a sheet seems to be easy i.e.

    If ws.ProtectContents = False Then Module2.lock_sheet ws

    But how do I do it for the book? The reason I am asking is that there seems to be a bug whereby if you try and protect a book that is already protected, the effect is to remove the protection. This means I need to check the state before any application of the protection commands.

    hope you can help me

    thanks

  2. #2

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    8

    Re: Query the thisworkbook.protect

    I am being an idiot again!

    ActiveWorkbook.ProtectStructure tells you

    sorry. But the bug is worth noting.

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width