Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Charting / September 2007

Tip: Looking for answers? Try searching our database.

Protection of worksheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Asiageek - 05 Sep 2007 12:24 GMT
Can worksheets be protected by one password rather than passwords for each
worksheet? I am using certain ranges allowed to be edited/used by the user
but not all worksheets are the same usable ranges.

Possible based on my current settings for the worksheets, can be protected
by one password and yet the data will continue to update itself?

Tired of entering the password for all sheets to change things!
Pranav Vaidya - 05 Sep 2007 17:34 GMT
Hi,

Here are 2 custom routines which will help you protect and unprotect all the
worksheets in the currently open workbook in one go.

Sub MyProtect()
   Dim sht As Worksheet
   
   For Each sht In ActiveWorkbook.Sheets
       sht.Protect "abcd"
   Next
End Sub

Sub MyUnprotect()
Dim sht As Worksheet
   
   For Each sht In ActiveWorkbook.Sheets
       sht.Unprotect "abcd"
   Next
End Sub

Copy these in the VBA/Maro Editing window to your workbook and run.
Please note 'abcd' is the password, which you can replace as per your choice.

HTH,
Signature

Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!

> Can worksheets be protected by one password rather than passwords for each
> worksheet? I am using certain ranges allowed to be edited/used by the user
[quoted text clipped - 4 lines]
>
> Tired of entering the password for all sheets to change things!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.