Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Protecting worksheet.

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Protecting worksheet.

Rich,

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

ActiveSheet.Protect Password:="guru11"

-Ben
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protecting worksheet Art Cummings Excel Programming 2 May 14th 09 06:20 PM
Protecting worksheet John in Wembley Excel Programming 1 January 28th 08 09:41 PM
Protecting a worksheet sherobot Excel Programming 5 June 8th 07 11:52 PM
Protecting Worksheet Tony Excel Discussion (Misc queries) 2 May 2nd 05 01:45 PM


All times are GMT +1. The time now is 04:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"