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 / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Unprotect Sheet with Password Included

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James C. - 17 Mar 2008 17:49 GMT
Hi,

Hoping someone can help. I am trying to create a button that does the
following

1. Unprotects my excel sheet
2. Automatically inserts the unprotect password into the string so the user
doesn't have to type it. Probably seems odd and a bad use of even having a
password but in the end it makes sense for what I am trying to do.

Right now I am using the following code to unprotect the sheet, but again it
prompts me for the password instead of automatically inserting it in.

Activesheet.unprotect

Thanks for any help
Nigel - 17 Mar 2008 18:03 GMT
You can add the password parameter to both unprotect and protect

e.g
ActiveSheet.Unprotect ("myPassword")
ActiveSheet.Protect ("myPassword")

or you can use a named parameter

ActiveSheet.Unprotect Password:="myPassword"
ActiveSheet.Protect Password:="myPassword"

Signature

Regards,
Nigel
nigelnospam@9sw.co.uk

> Hi,
>
[quoted text clipped - 14 lines]
>
> Thanks for any help
Mike H - 17 Mar 2008 18:05 GMT
Try

ActiveSheet.Unprotect Password:="xxx"
Mike

> Hi,
>
[quoted text clipped - 12 lines]
>
> Thanks for any help
Jim May - 17 Mar 2008 18:12 GMT
With Sheet1
         .Unprotect Password:="ABCD"
     End With

> Hi,
>
[quoted text clipped - 14 lines]
>
> Thanks for any help
 
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



©2008 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.