+ Reply to Thread
Results 1 to 6 of 6

Protect all sheets at once

  1. #1
    ~me~
    Guest

    Protect all sheets at once

    I have a workbook with about 30 pages. I want to be able to protect and
    unprotect them all at once. I cannot select all sheets and then protect them
    because the option will not be available. Any Ideas?
    TIA
    Wayne



  2. #2
    davegb
    Guest

    Re: Protect all sheets at once


    ~me~ wrote:
    > I have a workbook with about 30 pages. I want to be able to protect and
    > unprotect them all at once. I cannot select all sheets and then protect them
    > because the option will not be available. Any Ideas?
    > TIA
    > Wayne


    I have a couple of macros I use to protect/unprotect each worksheet in
    large workbooks. I have them assigned to buttons on a custom toolbar I
    use when developing worksheets. If you'd like me to post the macros,
    I'd be happy to. If you don't know how to implement them, I can
    explain.


  3. #3
    Paul B
    Guest

    Re: Protect all sheets at once

    Wayne,

    Sub Protect_All_Sheets()

    Dim ws As Worksheet

    For Each ws In ThisWorkbook.Worksheets

    ws.Protect password:="123"

    Next ws

    End Sub



    Sub Unprotect_All_Sheets()
    Dim ws As Worksheet
    For Each ws In ThisWorkbook.Worksheets
    ws.Unprotect password:="123"
    Next ws
    End Sub
    --
    Paul B
    Always backup your data before trying something new
    Please post any response to the newsgroups so others can benefit from it
    Feedback on answers is always appreciated!
    Using Excel 2002 & 2003


    "~me~" <[email protected]> wrote in message
    news:[email protected]...
    >I have a workbook with about 30 pages. I want to be able to protect and
    > unprotect them all at once. I cannot select all sheets and then protect
    > them
    > because the option will not be available. Any Ideas?
    > TIA
    > Wayne
    >
    >




  4. #4
    ~me~
    Guest

    Re: Protect all sheets at once

    Paul,
    Thank you very much, that was perfect, I just altered it a tad to allow for
    formatting and took out the password.
    Thank you I appreciate your help
    Wayne

    "Paul B" <[email protected]> wrote in message
    news:#[email protected]...
    > Wayne,
    >
    > Sub Protect_All_Sheets()
    >
    > Dim ws As Worksheet
    >
    > For Each ws In ThisWorkbook.Worksheets
    >
    > ws.Protect password:="123"
    >
    > Next ws
    >
    > End Sub
    >
    >
    >
    > Sub Unprotect_All_Sheets()
    > Dim ws As Worksheet
    > For Each ws In ThisWorkbook.Worksheets
    > ws.Unprotect password:="123"
    > Next ws
    > End Sub
    > --
    > Paul B
    > Always backup your data before trying something new
    > Please post any response to the newsgroups so others can benefit from it
    > Feedback on answers is always appreciated!
    > Using Excel 2002 & 2003
    >
    >
    > "~me~" <[email protected]> wrote in message
    > news:[email protected]...
    > >I have a workbook with about 30 pages. I want to be able to protect and
    > > unprotect them all at once. I cannot select all sheets and then protect
    > > them
    > > because the option will not be available. Any Ideas?
    > > TIA
    > > Wayne
    > >
    > >

    >
    >




  5. #5
    Paul B
    Guest

    Re: Protect all sheets at once

    Your welcome

    --
    Paul B
    Always backup your data before trying something new
    Please post any response to the newsgroups so others can benefit from it
    Feedback on answers is always appreciated!
    Using Excel 2002 & 2003

    "~me~" <[email protected]> wrote in message
    news:[email protected]...
    > Paul,
    > Thank you very much, that was perfect, I just altered it a tad to allow

    for
    > formatting and took out the password.
    > Thank you I appreciate your help
    > Wayne
    >
    > "Paul B" <[email protected]> wrote in message
    > news:#[email protected]...
    > > Wayne,
    > >
    > > Sub Protect_All_Sheets()
    > >
    > > Dim ws As Worksheet
    > >
    > > For Each ws In ThisWorkbook.Worksheets
    > >
    > > ws.Protect password:="123"
    > >
    > > Next ws
    > >
    > > End Sub
    > >
    > >
    > >
    > > Sub Unprotect_All_Sheets()
    > > Dim ws As Worksheet
    > > For Each ws In ThisWorkbook.Worksheets
    > > ws.Unprotect password:="123"
    > > Next ws
    > > End Sub
    > > --
    > > Paul B
    > > Always backup your data before trying something new
    > > Please post any response to the newsgroups so others can benefit from it
    > > Feedback on answers is always appreciated!
    > > Using Excel 2002 & 2003
    > >
    > >
    > > "~me~" <[email protected]> wrote in message
    > > news:[email protected]...
    > > >I have a workbook with about 30 pages. I want to be able to protect

    and
    > > > unprotect them all at once. I cannot select all sheets and then

    protect
    > > > them
    > > > because the option will not be available. Any Ideas?
    > > > TIA
    > > > Wayne
    > > >
    > > >

    > >
    > >

    >
    >




  6. #6
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    The other alternative is to download ASAP utilities which provides this as one of the many additional add-ins.

    Ed

+ 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