PC Review


Reply
Thread Tools Rate Thread

Worksheet protection

 
 
Patrick Simonds
Guest
Posts: n/a
 
      9th Nov 2006
I have a work book with over 120 worksheets. Is there any way to set the
worksheet protection on all worksheets so that a user can only select
unlocked cells. I know I can do this by selecting each worksheet, one at a
time, and deselecting all options but "select unlocked cells", but that
will be very time consuming.


 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      9th Nov 2006
Patrick

A macro will do what you want.

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
With Sheets(n)
.Protect Password:="justme"
.EnableSelection = xlUnlockedCells
End With
Next n
Application.ScreenUpdating = True
End Sub

To unprotect all sheets just change .Protect to . UnProtect


Gord Dibben MS Excel MVP

On Thu, 9 Nov 2006 09:42:03 -0800, "Patrick Simonds" <(E-Mail Removed)>
wrote:

>I have a work book with over 120 worksheets. Is there any way to set the
>worksheet protection on all worksheets so that a user can only select
>unlocked cells. I know I can do this by selecting each worksheet, one at a
>time, and deselecting all options but "select unlocked cells", but that
>will be very time consuming.
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Protection vs. Worksheet Protection =?Utf-8?B?a213aGl0dA==?= Microsoft Excel Misc 4 24th Sep 2006 03:37 AM
Worksheet protection is gone and only wokbook protection can be se =?Utf-8?B?RXJpYyBDLg==?= Microsoft Excel Misc 4 2nd May 2006 05:50 PM
Re: Worksheet protection Norman Jones Microsoft Excel Programming 0 13th Sep 2004 04:46 PM
Worksheet protection lestergit Microsoft Excel Worksheet Functions 6 5th Aug 2004 06:33 PM
worksheet protection Kyle Microsoft Excel Worksheet Functions 4 29th Jul 2004 10:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:56 PM.