+ Reply to Thread
Results 1 to 2 of 2

Sheet protection in mass?!

  1. #1
    Kane
    Guest

    Sheet protection in mass?!

    XL2k,sp3
    I have 12 worksheets in a workbook that is book and sheet protected for many
    reasons. Is it possable to unprotect / protect ALL sheets at once, to allow
    maintenance/upgrade's to the cell contents? Certainly would make it easier
    than to have to unlock and lock each sheet.
    Tks ....

    Kane

  2. #2
    Gord Dibben
    Guest

    Re: Sheet protection in mass?!

    Kane

    Only through VBA.

    Sub ProtectAllSheets()
    Application.ScreenUpdating = False
    Dim n As Single
    For n = 1 To Sheets.Count
    Sheets(n).Protect Password:="justme"
    Next n
    Application.ScreenUpdating = True
    End Sub

    Sub UnprotectAllSheets()
    Application.ScreenUpdating = False
    Dim n As Single
    For n = 1 To Sheets.Count
    Sheets(n).Unprotect Password:="justme"
    Next n
    Application.ScreenUpdating = True
    End Sub

    If not familiar with VBA and macros, see David McRitchie's site for more on
    "getting started".

    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    In the meantime..........

    First...create a backup copy of your original workbook.

    To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

    Hit CRTL + R to open Project Explorer.

    Find your workbook/project and select it.

    Right-click and Insert>Module. Paste the code in there. Save the
    workbook and hit ALT + Q to return to your workbook.

    Run the macro by going to Tool>Macro>Macros.


    Gord Dibben Excel MVP

    On Tue, 11 Jan 2005 22:21:04 -0800, "Kane" <[email protected]>
    wrote:

    >XL2k,sp3
    >I have 12 worksheets in a workbook that is book and sheet protected for many
    >reasons. Is it possable to unprotect / protect ALL sheets at once, to allow
    >maintenance/upgrade's to the cell contents? Certainly would make it easier
    >than to have to unlock and lock each sheet.
    >Tks ....
    >
    >Kane



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1