View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ALEX ALEX is offline
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