LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default VBA to Protect Worksheet

I accidentally used the following code in some VBA to protect my worksheet:
ActiveSheet.Protect Password = "grencr" (I excluded the colon)

I should have used: ActiveSheet.Unprotect Password:="grencr".

The code worked and my worksheet is now protected, but I'm not sure what the
password is. It is no longer grencr. Any idea what my password was set to
since I didn't include the : in the code?

Thanks
 
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
Can protect worksheet then workbook but not Protect and Share in code [email protected] Excel Programming 7 January 16th 17 07:01 AM
protect worksheet Selen Excel Discussion (Misc queries) 3 April 29th 10 03:56 PM
worksheet protect jnu Excel Worksheet Functions 2 March 23rd 06 01:35 PM
How to protect a worksheet from being copied to another worksheet SurvivorIT Excel Discussion (Misc queries) 3 August 31st 05 01:53 PM
Protect worksheet madcat[_9_] Excel Programming 1 August 30th 04 02:46 AM


All times are GMT +1. The time now is 07:22 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"