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.
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,
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
>
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
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks