Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Unable to protect and share protected workbook through VB

  1. #1
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Apologies for starting a new thread, just wondered if anyone had found a way round this: -

    ThisWorkbook.Protect Structure:=True, Windows:=False
    ThisWorkbook.ProtectSharing sharingpassword:="bobbins"

    Doesn't work and gives an invalid procedure call. Removing the first line does work...

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Muddy

    I'll try another, and yes I have never had to use sharing!

    When you use the "ProtectSharing" method does't that protect the Workbook anyway? so putting the "Protect" method first would stop the "ProtectSharing" method.

    In a few word, do you need the "Protect" and if so try it last.



  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Unfortunately, it doesn't protect the workbook's structure, no, and once you've protected it for sharing, the option for protecting it's structure or any sheets within it is no longer availble. Nice catch-22.

    Note that you CAN protect the workbook structure and then protect for sharing via normal operation, but not in Vb.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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