+ Reply to Thread
Results 1 to 2 of 2

excel protection:Is there anyway to get all of the sheets protected at one time?

  1. #1
    Jeannine
    Guest

    excel protection:Is there anyway to get all of the sheets protected at one time?

    Is there a way to protect all of the worksheets at once. When I use the
    workbook protection it doesn't do what I need.

    It seems the only way I can protect specific cells is to use the sheet
    protection and this means one sheet at a time.

    Is there anyway to get all of the sheets protected at one time??

  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Quote Originally Posted by Jeannine
    Is there a way to protect all of the worksheets at once. When I use the
    workbook protection it doesn't do what I need.

    It seems the only way I can protect specific cells is to use the sheet
    protection and this means one sheet at a time.

    Is there anyway to get all of the sheets protected at one time??
    Try using this macro. You can stick it in your Personal.xls, then just run it whenever you want.

    Public Sub ProtectAllSheets()
    Dim aWorksheet As Worksheet

    For Each aWorksheet In Worksheets
    aWorksheet.Protect "YourPassword"
    Next aWorksheet

    End Sub

    If you want, you can add code to prompt you for the password. You can also set it up so that you can choose when running it whether you want to protect or unprotect all sheets.

    Scott

+ 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