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 / Worksheet Functions / December 2005

Tip: Looking for answers? Try searching our database.

Code to protect sheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Conditional Formatting - 21 Dec 2005 20:42 GMT
what will be the VB code to protect sheet. thnaks
Gord Dibben - 21 Dec 2005 23:04 GMT
With a password or not?

These apply a password.

Sub SHEETPROTECT()
   ActiveSheet.Protect Password:="justme"
End Sub

Sub SHEETUNPROTECT()
   ActiveSheet.Unprotect Password:="justme"
End Sub

Note: if youe users are snoopy, you should lock your VBA Project for viewing.

And be aware that worksheet and workbook protection is easily cracked so
protecting a sheet only prevents accidents.

Gord Dibben Excel MVP

>what will be the VB code to protect sheet. thnaks
 
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.