PC Review


Reply
Thread Tools Rate Thread

Protecting worksheet.

 
 
richard.mogy@gmail.com
Guest
Posts: n/a
 
      17th Aug 2012
I have used the following code to protect a worksheet while leaving certain cells unprotected.

Range("bi" & RowNum & ":cn" & UnprotectLastRow).Locked = False
Range("bk" & RowNum & ":bw" & UnprotectLastRow).Locked = True

ActiveSheet.Protect Password = "guru11"

I would like the manager to be able to unprotect the workbook within Excel. When I go into Review-->Unprotect sheet. It asks for a password. I provide the password above and it doesn't like it.

Am I going to the wrong place for this?

If so, where should I go?

If not, what do I need to do?

Thanks in Advance

Rich
 
Reply With Quote
 
 
 
 
benmcclave@gmail.com
Guest
Posts: n/a
 
      1st Sep 2012
Rich,

You are missing a colon after Password. This line worked for me:

ActiveSheet.Protect Password:="guru11"

-Ben
 
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
protecting formulas without protecting sheet so grouping still wor JM Microsoft Excel Misc 1 4th Jun 2009 06:42 AM
Password Protecting Documents: Not Protecting Header abalboa Microsoft Word Document Management 2 8th May 2008 02:01 PM
Protecting a doc without protecting the header cvirchis Windows XP General 0 27th Jul 2004 05:15 PM
Protecting buttons with VB code rather than protecting sheets/books? StargateFanFromWork Microsoft Excel Programming 2 16th Jul 2004 04:03 PM
protecting formulas w/o protecting worksheet format Michelle Microsoft Excel Misc 2 12th Nov 2003 04:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:18 PM.