Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Mar 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Protecting/Unprotecting Multiple Sheets (2003)

    I'd like to be able to take a group of multiple sheets in a workbook and protect/unprotect them all at once although I'm unable to figure it out. Can someone give me a hand? Thanks for the help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Protecting/Unprotecting Multiple Sheets (2003)

    You cannot protect or unprotect multiple worksheets at once. You can create a macro that loops through the selected sheets and protects or unprotects them.

    For example:

    Sub ProtectSheets()
    Dim wsh As Worksheet
    For Each wsh In ActiveWindow.SelectedSheets
    wsh.Protect
    Next wsh
    End Sub

    Sub UnprotectSheets()
    Dim wsh As Worksheet
    For Each wsh In ActiveWindow.SelectedSheets
    wsh.Unprotect
    Next wsh
    End Sub

    You can add a password after Protect and Unprotect, if desired.

Posting Permissions

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