+ Reply to Thread
Results 1 to 2 of 2

Worksheet protection

  1. #1
    ordnance1
    Guest

    Worksheet protection

    I have a workbook with 12 sheets. What I would like to do is protect all 12
    with a password of "Popcorn", without having to select each sheet. Then I
    would like to do the reverse of unprotecting them without having to select
    them.

  2. #2
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    You could add two routines to your workbook:

    sub protect_all_sheets()
    for each w in thisworkbook.worksheets
    w.protect password:="Popcorn"
    next
    end sub

    sub unprotect_all_sheets()
    for each w in thisworkbook.worksheets
    w.unprotect password:="Popcorn"
    next
    end sub



    Col

+ 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