+ Reply to Thread
Results 1 to 3 of 3

Protecting Selected Sheets

  1. #1
    Registered User
    Join Date
    11-16-2004
    Posts
    27

    Protecting Selected Sheets

    I have three sheets Sheet1, 2 & 3. I want to create a script that will password protect sheets 2 & 3 only.

    Any help will be greatly appreciated.

    Nick.

  2. #2
    Chip Pearson
    Guest

    Re: Protecting Selected Sheets


    Nick,


    Worksheets(2).Protect Password:="whatever"
    Worksheets(3).Protect Password:="whatever"


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Nick S" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I have three sheets Sheet1, 2 & 3. I want to create a script
    > that will
    > password protect sheets 2 & 3 only.
    >
    > Any help will be greatly appreciated.
    >
    > Nick.
    >
    >
    > --
    > Nick S
    > ------------------------------------------------------------------------
    > Nick S's Profile:
    > http://www.excelforum.com/member.php...o&userid=16512
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=527642
    >




  3. #3
    Don Guillett
    Guest

    Re: Protecting Selected Sheets

    use a loop something like
    for each ws in worksheets
    if ws.name <>"sheet1" then ws.protect.password="joe"
    next


    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Nick S" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I have three sheets Sheet1, 2 & 3. I want to create a script that will
    > password protect sheets 2 & 3 only.
    >
    > Any help will be greatly appreciated.
    >
    > Nick.
    >
    >
    > --
    > Nick S
    > ------------------------------------------------------------------------
    > Nick S's Profile:
    > http://www.excelforum.com/member.php...o&userid=16512
    > View this thread: http://www.excelforum.com/showthread...hreadid=527642
    >




+ 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