Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Protecting Multiple Sheets (97)

    When I select multiple sheets, Excel will not let me turn sheet protection on or off. Is there any way to avoid going through the workbook and toggling the sheets one-at-a-time? Workbook protection does not give me the protection I need so I have to use sheet protection.

    Ronny
    Ronny Richardson

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Protecting Multiple Sheets (97)

    I think you need some VBA for this. Try the following<pre>Dim ws As Worksheet
    For Each ws In ThisWorkbook.Worksheets
    ws.Protect Password:="password", _
    DrawingObjects:=True, _
    Contents:=True, _
    Scenarios:=True
    Next</pre>


    The above protects, and each argument is optional.

    To unprotect change the bold section to ws.Unprotect. Here the password is dependant on that used when protecting.

    Andrew C

Posting Permissions

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